Homebrewserver.club website https://homebrewserver.club/
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
rra 0afc066924 Update 'content/instant-messaging/configuring_an_xmpp_server_prosody_0.11.md' 2 anos atrás
content Update 'content/instant-messaging/configuring_an_xmpp_server_prosody_0.11.md' 2 anos atrás
plugins enable plugins 5 anos atrás
themes/homebrewtheme Update 'themes/homebrewtheme/static/css/main.css' 4 anos atrás
.gitignore expand gitignore __pychache__ .venv etc 5 anos atrás
README.md Drop sub and fix link 3 anos atrás
pelicanconf.py added support for markdown attr_lists to add classes to images 5 anos atrás
publishconf.py Remove comments which wont be used 5 anos atrás
requirements.txt Remove invoke stuff we're not using 5 anos atrás

README.md

homebrewserver.club

https://homebrewserver.club/

Build the site locally

Get a local copy

$ git clone --recurse-submodules https://git.vvvvvvaria.org/varia/homebrewserver.club

System requirements

Install the system requirements:

$ apt install -y python3 python3-dev python3-venv

Python requirements

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

Generating the site

Generate the content and run the server:

$ pelican content
$ pelican --listen --relative-urls

Then the site is available at the following URL:

http://localhost:8000

Working with the site

While working on the site, you can run the following:

$ pelican --autoreload --listen --relative-urls

Writing drafts

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.

Deploying the site

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:

  • We have cloned the site in /srv/gitea/clones/homebrewserver.club
  • We have create a hook deployment script in /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.