Rendering References
References are the sources the assistant cites with an answer. They arrive on each result as result.payload.references — an array you loop over in the response template, rendering one card (the highlighted template) per source.
What a Reference Holds
| Field | What it is |
|---|---|
id | The reference's unique ID. |
title | Its heading. |
url | A link to the source. |
dataset | The dataset/source it came from. |
summary | An AI-generated summary (when available). |
body | The full text (may be empty). |
status, owner, parent, foundTime, key | Metadata about the item. |
type | The content type — drives which card renders it (see the next topic). |
metaOgImageURL | A preview image, when the source has one. |
pages | Page indices for a multi-page document, used to open the preview. |
reaction | The visitor's reaction on the answer, when set. |
Looping and Displaying
{% for reference in result.payload.references %}
<article class="skdwn-ref">
<h4>{{ reference.title }}</h4>
{% if reference.metaOgImageURL %}
<img src="{{ reference.metaOgImageURL }}" alt="{{ reference.title }}"/>
{% endif %}
{% if reference.summary %}
<p>{{ reference.summary | ellipsis: 160 }}</p>
{% endif %}
<a href="{{ reference.url }}" target="_blank">Open</a>
</article>
{% endfor %}
{{ }} prints a value; {% %} is logic. The ellipsis filter trims long text — one of many built-in filters.