A simple system based on ideas and code from org-jekyll and reprise.py to publish a blog using simple static html pages. Used for publishing my blog
- Python
- Jinja2 (for templating)
- Pygments (for code highlighting)
- LXML
- Org-mode
- Some shell commands are run [need porting, if running on windows]
- Git (or other version control system) [optional]
In Debian/Ubuntu:
sudo apt-get install python-jinja2 python-pygments python-lxml
- Set the
org-publish-project-alist
similiar to the one used by org-jekyll. Look atpublish.el
for an example. - Edit
reprise.py
to your settings. - Tag any sub-tree with a specific tag (I use
:ol:
, meaning online) and attach a timestamp to it (SCHEDULED, DEADLINE, or POST_DATE properties or a an inactive time stamp in the entry) to tell org-reprise that this subtree should be going “online”. The subtree can reside anywhere in the project files. - The org-mode property
WEB_CAT
can be set on any heading to define multiple categories for blog entries. You can use any values for theWEB_CAT
, but each entry can have only oneWEB_CAT
. These values for theWEB_CAT
should be appended to theCATEGORIES
dictionary in thereprise.py
file. - Run the
publish.el
script, when you want to publish. I have all my org-files in a git repo and a post hook runspublish.el
on every commit.
- Each subtree which needs to be published is exported to html and saved to a temporary file, with additional metadata like tags, post-data etc.
- These pages are then parsed, to publish a category page, individual pages for items and atom feed pages.
- Each tag gets a separate listing page and a separate atom feed, as well. A tag cloud page is generated as well.
- Code blocks are pygmentized.
- There are two types of categories, which I use. First, where each item is a “post”, which has a page of it’s own, along with a listing page for all the items in that category. Other, where there is only a listing page for the category and no individual pages for each item.
- No checks for updates are done. Just republishes the whole blog.
- Images and media isn’t being handled currently, since I don’t post media on my blog.
- It’s not a purely Emacs based solution; depends on Python, Jinja, Pygments, etc.
GNU General Public License 3.0