77
88# Using the Default Site
99
10- The fastest way to use Webifier is to let the default renderer do the work. You
11- create an ` index.yml ` , point it at content, and let Webifier build the page,
12- copy assets, and generate linked content pages.
10+ The fastest way to use Webifier is to enable the bundled extensions and let the
11+ default renderers do the work. You create an ` index.yml ` , point it at content,
12+ and let Webifier build the page, copy assets, and generate linked content pages.
13+
14+ Webifier core does not try to own a giant website syntax. The syntax becomes
15+ useful when extensions are enabled. In the default setup:
16+
17+ | Extension | What it teaches Webifier |
18+ | ---| ---|
19+ | ` webifier.standard ` | Page controls such as ` header ` , ` nav ` , ` meta ` , ` footer ` , sections, links, and the base page shell |
20+ | ` webifier.markdown ` | Markdown blocks and linked Markdown pages |
21+ | ` webifier.notebook ` | Linked notebook pages and notebook page config |
22+ | ` webifier.pdf ` | Linked PDF pages with site navigation and optional controls |
23+ | ` webifier.theme ` | Light/dark/system theme behavior |
1324
1425For the first-principles version of this idea, start with
1526[ YAML Pages and Sections] ( index=pages/user-guide/tutorials/01-yaml-pages-and-sections.yml ) .
@@ -28,6 +39,8 @@ config:
2839 uses : webifier.markdown
2940 notebook :
3041 uses : webifier.notebook
42+ pdf :
43+ uses : webifier.pdf
3144
3245header :
3346 title : My Project
@@ -45,21 +58,55 @@ docs:
4558 body : |
4659 - [Project Notes](md=pages/notes.md)
4760 - [Experiment Notebook](md=pages/experiment.ipynb)
61+ - [Final Report](pdf=reports/final.pdf)
4862` ` `
4963
50- The root YAML file becomes the home page. Each top-level key after ` title`,
51- ` header` , `nav`, `meta`, and `config` becomes a section rendered by the default
52- section renderer.
64+ The root YAML file becomes the home page. With ` webifier.standard` enabled,
65+ page-level keys such as `title`, `header`, `nav`, `footer`, `meta`, `style`, and
66+ ` config` are controls. Other top-level keys become sections rendered in source
67+ order.
68+
69+ That distinction is extension-defined. A custom extension can claim another
70+ page key, consume it, and remove it before section rendering. If no extension
71+ claims a key, the standard renderer treats it as content.
5372
5473# # What You Get By Default
5574
5675- A homepage assembled from YAML sections
5776- Markdown rendering for text blocks
5877- Generated pages for linked Markdown and notebook files
78+ - Embedded PDF pages when the PDF extension is enabled
5979- Asset copying for local images and files
6080- Search index generation
6181- Navigation, comments, analytics, and theme support when configured
6282
83+ # # The Default Contract
84+
85+ Use this split when you are deciding where something belongs :
86+
87+ | Put it here | When |
88+ |---|---|
89+ | `config.webifier.extensions` | You are enabling or configuring site behavior |
90+ | `config.<instance-name>` | You are overriding one extension for one page |
91+ | reserved page keys | You are changing page chrome, such as title, header, nav, or footer |
92+ | ordinary page keys | You are adding visible sections |
93+ | linked content files | You already have Markdown, notebooks, PDFs, HTML, or assets in the repo |
94+
95+ For example :
96+
97+ ` ` ` yaml
98+ config:
99+ markdown:
100+ toc: false
101+
102+ summary:
103+ label: Summary
104+ content: This is visible.
105+ ` ` `
106+
107+ ` config.markdown` changes Markdown behavior for this page. `summary` renders as
108+ content.
109+
63110# # When To Stay With Defaults
64111
65112Stay with the default renderer when the goal is to publish clearly, not design a
0 commit comments