This is a static website generator built with blogs in mind. Org-Site
ingests Org Mode source files
and Mustache templates, tracked with
git, and produces well-formatted, consistent, and organized HTML
pages.
To reference a demonstration see this website generated by these source files
- Automatic RSS feed generation for blogs
- Multiple-Blog support
- Automatic sitemap generation
- Invocation
$ ./org-site.py SRC DEST SRCis the top level directory for your source files. It must be tracked bygitfor the retrieval of file metadata- Important Note: Only files /committed/ to the
gitrepo will be recognized by theorg-siterendering process.
- Important Note: Only files /committed/ to the
DESTis the directory where rendered folders and HTML files should be produced.
-
org-sitegenerally mirrors the organization of the destination directory according to the organization of the source directory. -
An
org-sitewebsite is made up of blogs, and blogs are made up of indexes and posts. -
Templates are Mustache files with which
org-siterenders the posts and indexes into HTML files. Indexes and posts are Org files that provide content and values for the variables referenced by their corresponding templates
This directory is the root of your source file tree and will be
referenced throughout this documentation as root and /, but it can
be anywhere in your filesystem. Your .git folder should be
here. Root should contain at a minimum
- An
index.orgthat generates your home page. - A
defaults.orgfor assigning default values to template variables. These values will be inherited globally, but they can be overwritten by other Org files locally. - A
templatesdirectory to contain all Mustache templates. - Any other
.orgfiles in this directory will be treated like posts that do not belong to any blog. They will generateindex.htmlfiles and links to them will be added to the navigation section.- Example: a file at
/about_me.orgcontaining#+NAV-NAME: Aboutwill generate/about_me/index.htmlaccording to theposttemplate, and a corresponding link styled asAboutwill be added to the navigation bar.
- Example: a file at
- Any directory under root that contains an
index.orgfile is considered a blog. Thatindex.orgmust contain whatever variable values and content is necessary for theblog-indextemplate to process.- Example:
/turtle-grooming/index.orgcontaining#+NAV-NAME: Turtleswill generate/turtle-grooming/index.htmlaccording to theblog-indextemplate and/turtle-grooming/rss.xmlwill be generated according to thersstemplate. A link to theindex.html, styled asTurtles, will be available in thenavtemplate.
- Example:
- There must be a folder named
templatesdirectly under root. This will contain all.mustachetemplates necessary for site rendering - There are a few required
.mustachetemplates, examples of each can be found in this repository herecontainer:: The outermost template which recursively holds all others. Usually<!DOCTYPE html>and<html>...</html>are here. No other template may depend on this one; otherwise circular dependencies are guaranteed.headerandfooter:: For the HTML<header>and<footer>tags on every page.nav:: For the navigation bar shared by every pageblog-index:: For generating the table of posts belonging to a blog.rss:: For generating anrss.xmlfor a blogpost:: for the format of a post in a blog