#
Content
Use content to query and access any page in your project from within a template expression. You can look up pages by key, search across all pages, and iterate over collections such as tags, categories, authors, blog posts, and navigation items.
For page-level metadata, see Page properties. For project configuration values, see Project properties.
#
Page lookup
#
By key
Retrieve any page using content["key"], where the key is the page's filename (without extension), its title, or a relative path.
{{ content["getting-started"] }}
All of the following forms resolve the same page:
{{ content["getting-started"] }}
{{ content["Getting Started"] }}
{{ content["guides/getting-started"] }}
#
Page properties
Once you have a page reference, you can access all the page settings, including:
title: {{ content["getting-started"].title }}
description: {{ content["getting-started"].description }}
url: {{ content["getting-started"].url }}
path: {{ content["getting-started"].path }}
#
Output
title: Getting Started
description: This guide will have you up and running generating your own Retype website in just a few minutes.
url: https://retype.com/guides/getting-started/
path: /guides/getting-started/
filePath: /guides/getting-started.md
#
Render as a card
Pass a page filePath to the [!card] component to render a linked card for that page.
[!card]({{ content["getting-started"].filePath }})
This guide will have you up and running generating your own Retype website in just a few minutes.
Or use vertical cards:
[!card vert]({{ content["getting-started"].filePath }})
#
Conditional display
Check whether a page exists before linking to it. This is useful for optional or tier-specific content.
{{ if content["premium-features"] }}
Check out our [Premium Features]({{ content["premium-features"].path }}).
{{ end }}
#
Search
Use content.search("term") to find pages whose title contains the search term. Results are returned as an array of page objects.
#
Basic search
{{ for item in content.search("obsidian") ~}}
- [{{ item.title }}]({{ item.path }})
{{ end }}
#
Access a specific result
title: {{ content.search("getting started")[0].title }}
description: {{ content.search("getting started")[0].description }}
title: Getting Started
description: This guide will have you up and running generating your own Retype website in just a few minutes.
#
Limit search results
Combine with the array.limit filter to cap the number of results.
{{ for item in content.search("retype") | array.limit 5 ~}}
[!card vert]({{ item.path }})
{{ end }}
Retype v3.8 introduces powerful new linking capabilities, enhanced search functionality, and improved content management features. This release focuses on making documentation more interconnected and discoverable while adding modern conveniences for content creators.
Retype v3.9 brings improvements to callout components, broader syntax features to support other systems, enhanced image handling, and better print functionality. This release focuses on making Retype more compatible with other documentation platforms while adding powerful new features.
We're excited to share the latest release of Retype, packed with features that make documentation more flexible and powerful. This release focuses on improving content authoring, navigation control, and extending markdown capabilities. See the full changelog for the v3.10 release.
Retype v3.11 puts you in control of your project's visual identity, while keeping everything fast, clean, and easy to use. This release brings Pro-level theme customization, smarter navigation, and faster syntax options to help you create documentation that feels more like your own.
Retype v3.12 brings powerful new features for content discovery, visual design, and theme customization. This release introduces the Backlinks component for Retype Pro, automatic dark mode image switching, color preview chips, enhanced page descriptions, and comprehensive theming improvements.
#
Tags
#
List all tags
content.tags returns all tags defined across the project. Each tag has a title and a pages array.
- community (2 pages)
- github (4 pages)
- component (23 pages)
- icon (1 pages)
- templating (5 pages)
- guide (14 pages)
- hosting (6 pages)
- ftp (1 pages)
- config (5 pages)
- theme (1 pages)
- pro (3 pages)
#
Pages for a specific tag
{{ for page in content.tags["guide"].pages ~}}
- [{{ page.title }}]({{ page.path }})
{{ end }}
- Cloudflare Pages
- Docker
- Publish using FTP
- GitHub Pages
- GitLab Pages
- Heroku
- Netlify
- Blogging
- Retype CLI
- Getting Started
- GitHub Actions
- Markdown
- Themes
- Troubleshooting
#
Categories
#
List all categories
content.categories returns all categories defined across the project. Each category has a title and a pages array.
{{ for cat in content.categories ~}}
- [{{ cat.title }}](/categories/{{ cat.title }}) ({{ cat.pages | array.size }} pages)
{{ end }}
#
Authors
#
List all authors
content.authors returns all authors across the project. Each author entry has a name and a pages array.
#
Pages by a specific author
#
Blog Posts
content.blog.posts returns all blog posts in the project, ordered by date descending.
#
Latest as a Card
[!card]({{ content.blog.posts[0].path }})
Retype v4.1 has been primarily a community-driven release shaped by suggestions and feedback from Retype users. A huge thank you to the Retype community for your contributions and ideas that made it into this release. This release delivers a completely redesigned search experience, Unicode icon support, and new blog layout options.
#
List all blog posts
{{ for post in content.blog.posts ~}}
1. [{{ post.title }}]({{ post.path }})
{{ end }}
- What's New in Retype v4.1
- Self-hosting Obsidian Vault with Retype
- What's New in Retype v4.0
- What's New in Retype v3.12
- What's New in Retype v3.11
- What's New in Retype v3.10
- New GitHub Pages Community Key
- What's New in Retype v3.9
- What's New in Retype v3.8
#
Most recent as Cards
{{ for post in content.blog.posts | array.limit 3 ~}}
[!card vert]({{ post.path }})
{{ end }}
Retype v4.1 has been primarily a community-driven release shaped by suggestions and feedback from Retype users. A huge thank you to the Retype community for your contributions and ideas that made it into this release. This release delivers a completely redesigned search experience, Unicode icon support, and new blog layout options.
If you use Obsidian, chances are you’ve thought about publishing your vault online. Maybe it’s a personal digital garden, a team knowledge base, or project documentation. Obsidian Publish is a great option, and if you prefer to self-host and have full control over where your site is deployed, Retype is worth a look.
Retype v4.0 is here! This major version release brings powerful new components, expanded templating capabilities, and a complete upgrade of all internal libraries and dependencies. Your existing projects will work exactly as before, just faster and with a pile of new powerful features for all Retype users.
#
Navigation
content.nav exposes the project's navigation tree. Use .children to access the top-level items.
#
List top-level navigation items
- LICENSE (0 children)
- About (0 children)
- Changelog (0 children)
- Community (0 children)
- Faq (0 children)
- Feature log (0 children)
- Features (0 children)
- Components (27 children)
- Blog (9 children)
- Templating (5 children)
- Pro (1 children)
- Hosting (8 children)
- Samples (7 children)
- Configuration (6 children)
- Guides (9 children)
- Not Found (0 children)
#
All pages
content.pages is an array of all pages in the project. Use standard array filters to slice and query the list.
#
Access a page by index
title: {{ content.pages[0].title }}
description: {{ content.pages[0].description }}
#
Build a related pages section
Combine content.pages with array filters for curated page grids.
#
Escaping template syntax
#
Inline escaping
To display literal {{ }} syntax without the template engine processing it, wrap the content in opening {%{ and closing }%} escape tags:
{%{ {{ content["getting-started"].title }} }%}
#
Page-level escaping
To disable templating for an entire page, set templating: false in the page frontmatter:
---
templating: false
---
#
Project-level escaping
To disable templating project-wide, update your retype.yml with the following:
templating:
enabled: false