Data Pages

Some content is data for other pages, not a page itself, for example a glossary entry or a text fragment that many pages include. Set render: false to make a page content data.

---
title: Pod
lead: The smallest unit that Kubernetes deploys.
render: false
---

A data page:

  • is in the content index, so a template reads it through a relation, and accent query page <url> reads it;
  • has no route in accent serve, also with dev.show_drafts, and no output file in accent build;
  • appears in no listing, term page, feed, sitemap, search index, or llms.txt.

render: false is separate from status. A data page can be a draft: until it is published, no page reads it.

Read a data page in a template

Name the data pages in a relation of the page that reads them:

relations:
  terms:
    - /glossary/pod
    - /glossary/node

The template reads each data page as page.relations.terms. A data page has no URL, so show its fields and do not link it:

{% for term in page.relations.terms %}
  <dt>{{ term.title }}</dt>
  <dd>{{ term.lead }}</dd>
{% endfor %}

The “Terms” box below comes from two data pages of this site, read in this way by the default theme’s docs.html.jinja.

From Hugo

Hugo writes a data page as _build: {render: never}. In Accent, write render: false in its place.