v0.6.0
This release includes the ability to use an external theme, and updates the included templates to make that support easier to deal with. This was reported in #26, and implemented in #27.
Migration Overview
If you've previously edited the in-built templates, which would get overwritten upon upgrade, you can now avoid that problem:
- Install this new release.
- Export the in-built templates to a local directory.
- Edit them as you prefer, to change the text, CSS, and layout.
- Specify the local path to your theme in the
ephemeris.jsonfile, so that these themes will be used when you rebuild your blog.
Template Changes
The templates have been edited slightly in this release, as part of the migration. There are two changes:
.PrefixandPrefixvariables have changed.- These contain the URL-prefix to use when generating the blog.
- The new setting
{{PREFIX}}should be used to retrieve this value.
- Previously the templates included the
data/prefix to all include-files.- This has now gone away, and is unnecessary.
Migration Example
My own blog is stored within a git-repository and looked like this:
blog.steve.fi/
├── comments/
├── data/
└── ephemeris.json
I export the in-built templates to a local theme directory:
$ ephemeris -export-theme=theme/
Creating directory theme
..
Copying data/tag_page.tmpl to theme/tag_page.tmpl
Copying data/tags.tmpl to theme/tags.tmpl
This results in a directory tree looking like so:
blog.steve.fi/
├── comments/
├── data/
├── theme/
└── ephemeris.json
Now I update my configuration file to add a configuration-key ThemePath:
$ cat ephemeris.json
{
"PostsPath" : "data/",
"CommentAPI" : "https://api.steve.fi/Blog/",
"CommentsPath": "comments/",
"OutputPath" : "output/",
"Prefix" : "https://blog.steve.fi/",
"ThemePath" : "theme/"
}
Now this is done I can edit the contents of theme/* as I see fit, and remain confident that future upgrades will not overwrite my changes.