|
8 months ago | |
---|---|---|
content | 8 months ago | |
plugins | 1 year ago | |
themes/homebrewtheme | 10 months ago | |
.gitignore | 1 year ago | |
README.md | 1 year ago | |
pelicanconf.py | 1 year ago | |
publishconf.py | 1 year ago | |
requirements.txt | 1 year ago |
The new homebrewserver.club website :)
$ git clone --recurse-submodules https://git.vvvvvvaria.org/varia/nooo-hbsc
Install the system requirements:
$ apt install -y python3 python3-dev python3-venv
Then create a virtual environment and activate it:
$ python3 -m venv .venv
$ source .venv/bin/activate
Then install the requirements:
$ pip install -r requirements.txt
Generate the content and run the server:
$ pelican content
$ pelican --listen --relative-urls
Then the site is available at the following URL:
While working on the site, you can run the following:
$ pelican --autoreload --listen --relative-urls
Use Status: draft
in the article metadata. When the site is generated, the
output/drafts
folder will be created with your new draft article. This allows
us to work on new articles and still store the pages here in the repository.
We have a Git hook setup, so just push as you would as normal:
$ git push origin master
Details for maintaining the hook on the Varia server are:
/srv/gitea/clones/homebrewserver.club
/srv/gitea/gitea-repositories/varia/homebrewserver.club.git/hooks/post-update
How it works: when someone runs a git push origin master
, the script in the post-update
will run after the updating is finished. In this script, we run all the steps to publish the site as per usual. Such as running pip install -r requirements.txt
and pelican
to generate the new output.