Docs
Content types
Use docs and blog types, or add your own sections.
Docs
Pages under content/docs/ use layouts/docs/single.html. They get a sidebar built from the section’s pages in weight order, a table of contents when the page has headings, and pager links. Their JSON-LD type is TechArticle.
Set the type for the whole section in content/docs/_index.md:
cascade:
type: docs
Blog
Pages under content/blog/ use layouts/blog/single.html. The list shows cards with dates; posts show the author, date, and reading time. Their JSON-LD type is BlogPosting. Set the section cascade the same way:
cascade:
type: blog
You can set type: docs or type: blog in any page’s front matter to use those layouts from a different section.
Front matter
| Field | Used by | Purpose |
|---|---|---|
title | all | Page and navigation title. |
description | all | Summary, card text, meta description, and search result text. |
type | all | Selects the docs, blog, or default layout. |
weight | docs | Sidebar, pager, and home page order. Lower comes first. |
date | blog | Publication date and chronological order. |
author | blog | Byline shown under the title. |
hideFromHome | docs, blog | Omit from the home page lists. |
noSearch | all | Omit from search.json. |
draft | all | Keep the page out of the build until set to false. |
Other pages and sections
Pages that are neither docs nor blog use layouts/_default/single.html. That includes standalone pages such as a demo or an about page; it needs no special type. Sections use layouts/_default/list.html, so every section has a layout even if you add a new one.
Hiding pages
Set hideFromHome: true to keep a page out of the home page’s docs and blog lists while leaving it in its section, sidebar, and sitemap.
Set noSearch: true to leave a page out of search.json.