blog.opentechstrategies.com
This is OTS's blog backend. It contains:
- Pelican config
- Jinja templates
- Blog posts, pages, uploaded media
Developing And Writing Posts
In a terminal, do this:
git clone https://code.librehq.com/ots/ots-blog.git
cd ots-blog
./bin/build
./bin/serve
Then you can view the site on localhost:8000.
New posts go in sites/content/posts/
. When a post is ready, add it
to the git repo.
git add PATH/TO/POST
git commit -m "Add new post"
git push
TODO: add instructions for actually taking a post live. Theoretically, they
should be able to just rsync it somewhere, but maybe we should check out the
repo server-side and then do a git pull
and bin/build
. Alternatively, there
is a the push
script in bin
that rsyncs to opentechstrategies.com.
Dependencies
Pelican and Python
You will need Pelican with the markdown plugin. You can install it and the search plugin with:
pip install -r requirements.txt
If you want to work on the code, you will probably want the dev dependencies too:
pip install -r requirements-dev.txt
You might have to fiddle with a virtual environment, but that will be specific to your system, so I leave that to you.
Stork
Our search is based on Stork. You need the binary to make search work. You can download the v1.6.0 binary appropriate to your system from their GitHub Releases page. Put it in your bin directory (if it's on your path via .envrc or somesuch) or somewhere else on your path. If you're on Debian or Ubuntu, you can do this:
cd bin
wget https://github.com/jameslittle230/stork/releases/download/v1.6.0/stork-ubuntu-22-04 -O bin/stork-v1.6.0
chmod +x stork-v1.6.0
ln -s stork-v1.6.0 stork
License
GNU General Public License, Version 3 or later.