Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

v0.6.0

Latest

Choose a tag to compare

@skx skx released this 30 Oct 05:41
· 7 commits to master since this release
f4706d7

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.json file, 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:

  • .Prefix and Prefix variables 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.