Exclusive Metin2 game shield on FreeBSD: Automatic siege mode, VIP list, and whitelist from your dashboard. See how it works
Create a server

Guide

How to Set Up a Static Site with Pelican

Pelican builds static sites/blogs from Markdown or reStructuredText with Python. Great if you already use venv on the VPS.

Steps

  1. Install Python, pip and venv:

    sudo apt update
    sudo apt install -y python3 python3-pip python3-venv
  2. Create a venv and install Pelican:

    mkdir -p ~/sites/pelican-demo && cd ~/sites/pelican-demo
    python3 -m venv .venv && source .venv/bin/activate
    pip install pelican markdown
    pelican-quickstart
  3. Build the site (output/ folder):

    pelican content -o output -s pelicanconf.py
    ls output
  4. Publish output/ with Nginx:

    sudo mkdir -p /var/www/pelican-demo
    sudo 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;}EOF
    sudo ln -sf /etc/nginx/sites-available/pelican-demo /etc/nginx/sites-enabled/pelican-demo
    sudo nginx -t && sudo systemctl reload nginx

Tips

  • Activate the venv before each build: source .venv/bin/activate.
  • Themes: drop one under themes/ and set THEME in pelicanconf.py.

ext step

Python + static on your own VPS: Deploy your Cloud VPS.

Related guides