Multiple weblog templates are now available
I’m still woefully behind on overall documentation for Weblog.lol, but here’s a brand new feature: multiple templates! Your weblog will continue to have its existing default/canonical template, but you can now define additional templates and assign them to posts or pages.
Here’s how:
- First, make a new entry that will serve as your new template. It should have a
Type
set toTemplate
and aTitle
(which names the template so it can be referenced later). The entry body should be the html that you want to use for the template. Here’s a minimal example:
Type: Template
Title: My Awesome Second Template
<DOCTYPE html>
<meta charset="utf-8">
<title>Multiple weblog templates are now available</title>
{body}
- Now, pull up an existing entry (a post or a page) or create a new entry. Add this to its metadata:
Template: My Awesome Second Template
And the entry will now use the new template that you’ve created!
This is brand new and almost entirely untested, so there are likely bugs galore. Feel free to play around with it, and let me know if you run into any issues or have any questions or feedback.
Enjoy!
— Adam