Pelican builds static sites/blogs from Markdown or reStructuredText with Python. Great if you already use venv on the VPS.
Steps
Install Python, pip and venv:
sudo apt updatesudo apt install -y python3 python3-pip python3-venvCreate a venv and install Pelican:
mkdir -p ~/sites/pelican-demo && cd ~/sites/pelican-demopython3 -m venv .venv && source .venv/bin/activatepip install pelican markdownpelican-quickstartBuild the site (output/ folder):
pelican content -o output -s pelicanconf.pyls outputPublish output/ with Nginx:
sudo mkdir -p /var/www/pelican-demosudo rsync -a ~/sites/pelican-demo/output/ /var/www/pelican-demo/sudo tee /etc/nginx/sites-available/pelican-demo >/dev/null <<'EOF'server { listen 80; server_name example.com; root /var/www/pelican-demo; index index.html;}EOFsudo ln -sf /etc/nginx/sites-available/pelican-demo /etc/nginx/sites-enabled/pelican-demosudo nginx -t && sudo systemctl reload nginx
Tips
- Activate the venv before each build:
source .venv/bin/activate. - Themes: drop one under
themes/and setTHEMEin pelicanconf.py.
ext step
Python + static on your own VPS: Deploy your Cloud VPS.