Yet another static site generator. I created it to power my own site, http://rmgi.blog. Later, I decided to release it to the public.
With this blog software, you can create blog entries, add tags to an entry or browse entries by tag, add comments to an entry, and search entries by keyword.
- Minimalistic design
- Just about 400 lines of code
- Automatically generates sitemap and RSS feed
- Uses Markdown for post formatting
- Powered by Jinja2 template engine
- Code highlighting (requires Pygments)
- Comments hosted by Widgetpack
- Client-side search powered by fuse.js
- Social network share buttons
- Google Analytics integration (optional)
Though it is a fully functional software, it has it flaws.
- Every time you run the script, it rebuilds all the existing entries. In case you have hundreds of entries, the build process may be slow, or even run out of RAM and crash.
- Unused html files are not deleted, you have to do it by hand. This is done to prevent destructive behaviour.
- You can't have two (or more) entries with the same name. All of them will be overwritten by the next one without warnings.
- Though code is simple, it is not extendable.
- No automatic deployment/upload.
- No tests.
I hope to fix all of the above in the future.
- Clone or download the repository.
- Install requirements
pip install -r requirements.txt
. - Run
python src/blog.py copysettings
or manually copysrc/settings.py.example
tosrc/settings.py
. - Set
PUBLIC_DIR
andDRAFTS_DIR
in thesrc/settings.py
, although it should be good to go. - Run
python src/blog.py copystatic
or manually copy the contents ofstaticfiles
folder to yourPUBLIC_DIR
. - Create some posts in
DRAFTS_DIR
folder. - Run
python blog.py build
to assemble the site. - Upload your
PUBLIC_DIR
folder to your server.
Every time your write a new post, repeat steps 6 to 8.
If you want to have code highlighting, install Pygments pip install pygments
- HTML based on HTML5 boilerplate by H5BP
- Uses window-centering script by xThomasFrost
- Uses XML Sitemap Stylesheet by pedroborg.es
If you think my code infringes your copyright, please contact me.
Do whatever you want with the code, but it would be nice if you link back to this repo.