Templates
Into carbon copies
The other big part of using AutoSite are the templates. These are the "host" pages—all your formatting, layout, and metadata goes in these, the theory being that you build your site as normal and use that page as a "template" for every other page.
Templates, naturally, are stored in the template
folder, as HTML files.
The important part of each template is the [#content#]
variable. This is what AutoSite will replace for the content of each In page.
So if your In page consists of:
<!-- attrib title: Sample page --> <!-- attrib description: This is a sample description. --> <!-- attrib template: default --> This is a sample page, using [Markdown](https://www.markdownguide.org/). **Bolded text.**
And the default
template looks like this:
<!DOCTYPE html> <html lang="en"> <head> <title>[#title#]</title> <meta property="og:title" content="[#title#]"> <meta property="og:description" content="[#description#]"> </head> <body> [#content#] </body> </html>
The resulting page, in your Out folder, will look like this:
<!DOCTYPE html> <html lang="en"> <head> <title>Sample page</title> <meta property="og:title" content="Sample page"> <meta property="og:description" content="This is a sample description."> </head> <body> <p>This is a sample page, using <a href="https://www.markdownguide.org/">Markdown</a>. <strong>Bolded text.</strong></p> </body> </html>
You can have as many templates as you want. You'll specify which template to use in the template
variable in the comment metadata on each In page.