Content Structure in Template Repositories
How the documentation, services and blog templates model page types, the homepage, sections, lists and links between notes.
Every note has type, slug and title in its frontmatter; type picks the template and the address (rules.yaml → types). The three official templates use different type sets on the same mechanics.
Documentation template
home—/, the only one of its type.hub— a section; a page joins it withhub: ["dev"], and thebelongs_tolink plus thehub_itemscollection list it there. Hubs can nest.article,page— content pages,/{{ slug }}/;related: [...]adds manual links.search—/search/,footer— the footer note, loaded on every page.
Services template
home— template-rendered hero (title,description,kicker,facts), the services grid, the note body, recent works and a contact block.services(/uslugi/) andworks(/raboty/) — one page each, listing everyserviceandwork.service—/uslugi/{{ slug }}/, withpriceanddurationshown in a side card.work—/raboty/{{ slug }}/;service: "[[restavraciya]]"ties it to a service, and theservice_workscollection shows it on the service page.page— withshow_contacts: trueit gets the contacts fromSite.md.
The menu is a collection: notes with menu: true, sorted by order.
Blog template
home— the feed ofpostnotes sorted bydate, paginated (paginate: { collection: posts_all, per_page: 6, path: "/page/{{ n }}/" }).post—/{{ slug }}/withdateandtags; posts are marked up as Article and go to the RSS feed (feed.types: ["post"]).tags— one page grouping posts bytags(group_by: { by: fm.tags, multi: true }).page— static pages such as "About".
Lists are collections
Every list on a page is a collection in rules.yaml, read in a template as .Collections.<name>.Items (or .Groups when grouped):
filter— by type and frontmatter (type_in,fm_eq), sorted bytitle,slug,updated_atorfm.<key>;backrefs— notes that link to the current page through a link rule (works of a service, pages of a hub);forward— notes the current page links to (related, the service of a work).
Relations
- field links:
hub,related,service— a property holding a slug or a[[wikilink]]; - body wikilinks —
[[slug|text]]in the text, resolved by path, file name or slug (Links and Wikilinks); - embeds —
finds the file by name incontent/andmedia/, as Obsidian does.
Modeling your own notes
- Choose the template whose types are closest and rename types in
rules.yamlrather than inventing new mechanics. - Give every note a
description: it is the search snippet, the feed item and whatvalidate --seochecks. - Keep
slugstable; when you change it, leave a note withredirect_to. - Mark unfinished notes
draft: true— collections, search, the feed and the sitemap skip them.