There are pages and templates.
Pages are the content of the site. They're loaded by recursively reading the files from a defined folder.
With
site.process, any kind of processing for any kind of file format can be added. You can modify page, remove them or add new ones. This also includes registering global variables and helpers by simply adding them to every single page. Really, this one simple function makes anything possible SSGs are used for.Pages are sent to templates. Since pages are actually all sorts of files (not just Markdown, but also images and stuff), they will be sent to a passthrough template by default that simply outputs the binary data. More formats can be added with a template handler based on the MIME type.
Templates may have a validator function to make sure they receive the metadata they expect. It's a function that returns either the parsed data or an error. Since this is so generic, you can plug in your favorite library.
This will give you helpful errors and provide JSX-based templates with typed props.
And that's the whole thing.


