Douglas is a file-based blog system written in Python with the following features:
Douglas is a rewrite of Pyblosxom <http://pyblosxom.github.io>
_.
There are other file-based blog systems out there that have a more complete feature set. I continued this one because at the time, it was easier to continue working on this than to switch.
However, I've now switched to nikola <https://getnikola.com/>
_. It's
pretty swell. It was easy to switch my Pyblosxom/Douglas blog over.
Ergo, this project is dead for now.
:Code: https://github.com/willkg/douglas :License: MIT :Issues: https://github.com/willkg/douglas/issues :Docs: https://douglas.readthedocs.io/ :Status: Extreme Alpha
Create a virtual environment
Activate the virtual environment
Install Douglas into your virtual environment::
pip install https://github.com/willkg/douglas/archive/master.zip#egg=douglas
Create a new blog structure::
douglas-cmd create
For example: douglas-cmd create blog
Edit the blog/config.py
file. There should be instructions
on what should get changed and how to change it.
Change directories to blog
and then render the site::
douglas-cmd compile
Collect the static assets::
douglas-cmd collectstatic
Copy the compiled_site/
directory tree to where they're
available for serving by your web server.
Each file in blog/entries/
is a blog entry. They are text files.
You can edit them with any text editor.
The blog is rendered using Jinja2. The templates are in the
blog/themes/
directory. A theme consists of:
content_type
file which has the mimetype of the output being rendered
(e.g. text/html
)entry.<themename>
file which is used when rendering a page
with a single entryentry_list.<themename>
file which is used when rendering a
page with a bunch of entries (e.g. category list, date archive list,
front page, ...)static/<themename>/
subdirectoryThe following plugins which come with Douglas are enabled by default
in your load_plugins
config property:
douglas.plugins.draft_folder
Creates a draft folder that you can view on the web-site, but
doesn't show up in the archive links. This makes it easier for
other people to review entries before they're live.
The draft dir is ``blog/drafts/``.
When you want to make an entry live, you move it from
``blog/drafts/`` to ``blog/entries/``.
douglas.plugins.published_date
Add ``#published YYYY-MM-DD HH:MM`` to the metadata in your blog
entries. That's the published date for the blog entry rather than
the mtime of the file.
Douglas comes with other useful plugins. Refer to the documentation for a list.
You can write your own plugins and put the plugin files in
blog/plugins/
and add the plugin Python module to the
load_plugins
list in your config.py
file.