···3636- ~~renomer le block index-list.webt en navigation.webt~~
3737- ~~Ajouter gestion d'une ligne "name: mon nom" pour le block navigation~~
3838- ~~Ajouter l'indentation des items dans le block navigation~~
3939-- Pourquoi VSCode me remet les pages de templates en HTML pour le Language Mode alors que je spécifie Handlebars ? Comment forcer Handlebars
3939+- ~~Pourquoi VSCode me remet les pages de templates en HTML pour le Language Mode alors que je spécifie Handlebars ? Comment forcer Handlebars~~
4040- Pouvoir spécifier un template pour une entrée
4141- **EN COURS** - commencer un site webette pour la documentation webette
4242- Plugin webette de TOC (sommaire, table des matières)
+1-1
docs/helpers.md
···1717{{#if (in "posts" site.collections)}}...{{/if}} {{!-- enters block if "posts" exists --}}
1818{{first entry.blocks}} {{!-- first block object --}}
1919{{firstBlockOfType entry.blocks "image"}} {{!-- first image block or "" --}}
2020-{{renderLayout "layout/post.html"}} {{!-- renders the post layout with current context --}}
2020+{{renderLayout "post"}} {{!-- renders the post layout with current context --}}
2121```
22222323## Strings / text
···6677- Tool defaults are configured in `webette.tool.ts` (`templates.root` and `templates.default.*`).
88- The renderer looks first under the site root (`<site>/<templates.root>/...`), then falls back to the tool (`process.cwd()` + `templates.root`).
99-- Folder structure: `wrapper/` for the wrapper, `layout/` for layouts (registered as partials), `partial/` for classic partials (e.g. `templates/partial/header.hbs` -> `{{> header}}`). `layout/index.html` is the default index layout used for root/collection listings when index generation is enabled. `layout/access-forbidden.html` is the default layout used to render forbidden placeholders in asset folders. `layout/not-found.html` is the default layout used to render the static `404.html`.
99+- Folder structure: `wrapper/` for the wrapper, `layout/` for layouts (registered as partials), `partial/` for classic partials (e.g. `templates/partial/header.hbs` -> `{{> header}}`). `layout/index.hbs` is the default index layout used for root/collection listings when index generation is enabled. `layout/access-forbidden.hbs` is the default layout used to render forbidden placeholders in asset folders. `layout/not-found.hbs` is the default layout used to render the static `404.html`.
1010- Helper: the wrapper calls `{{{renderLayout layoutName}}}` which resolves the layout (partial) by name; `layoutName` defaults to `templates.default.layout`.
11111212## Template syntax
···34343535## Default wrapper + layout
36363737-- The fallback wrapper (`templates/wrapper/wrapper.html`) envelopes the page and delegates the body to a layout via `renderLayout`.
3838-- The fallback layout (`templates/layout/post.html`) renders an entry (title, markdown/text/image/audio/video blocks) and shows a simple draft badge when `entry.isDraft` is `true`.
3939-- The fallback index layout (`templates/layout/index.html`) renders the root or collection listings (simple links + counters).
4040-- The fallback access-forbidden layout (`templates/layout/access-forbidden.html`) renders minimal "Access forbidden" pages in asset folders.
4141-- The fallback not-found layout (`templates/layout/not-found.html`) renders the static `404.html` page.
3737+- The fallback wrapper (`templates/wrapper/wrapper.hbs`) envelopes the page and delegates the body to a layout via `renderLayout`.
3838+- The fallback layout (`templates/layout/post.hbs`) renders an entry (title, markdown/text/image/audio/video blocks) and shows a simple draft badge when `entry.isDraft` is `true`.
3939+- The fallback index layout (`templates/layout/index.hbs`) renders the root or collection listings (simple links + counters).
4040+- The fallback access-forbidden layout (`templates/layout/access-forbidden.hbs`) renders minimal "Access forbidden" pages in asset folders.
4141+- The fallback not-found layout (`templates/layout/not-found.hbs`) renders the static `404.html` page.
42424343Sites can override wrapper and layouts by dropping their files under `<site>/<templates.root>/wrapper/...` and `<site>/<templates.root>/layout/...`; resolution order is site > tool.
4444If the site config does not declare `templates.root`, or if the directory is missing, Webette logs a warning and falls back to tool templates. If a site omits any `templates.default.*` key, Webette logs a warning and falls back to the tool defaults for that key.
···5151templates: {
5252 root: "_templates",
5353 default: {
5454- index: "layout/index.html"
5454+ index: "layout/index.hbs"
5555 },
5656 custom: {
5757 index: {
5858- root: "layout/index-root.html",
5959- collections: "layout/index-collection.html",
5858+ root: "layout/index-root.hbs",
5959+ collections: "layout/index-collection.hbs",
6060 collection: {
6161- posts: "layout/index-posts.html"
6161+ posts: "layout/index-posts.hbs"
6262 }
6363 }
6464 }
···11<h1>Access forbidden</h1>
22-<p>Sorry, you can't be here 🖤</p>
33-<p><a href="/">← Back to site</a></p>
22+<p>Sorry, you can't be here.</p>
33+<p><a href="/">← Back to site</a></p>
···7788<main>
99 <p>We could not find the page you requested.</p>
1010- <p>
1111- <a href="/">Go back to the homepage</a>
1212- </p>
1313-</main>
1010+ <p><a href="/">Go back to the homepage</a></p>
1111+</main>
···11<h1>Access forbidden</h1>
22-<p>Sorry, you can't be here 🖤</p>
33-<p><a href="/">← Back to site</a></p>
22+<p>Sorry, you can't be here.</p>
33+<p><a href="/">← Back to site</a></p>