Jekyll turns Markdown into static HTML. On a VPS it fits light blogs with no database or PHP.
Steps
Install Ruby and build dependencies:
sudo apt updatesudo apt install -y ruby-full build-essential zlib1g-devruby -vInstall Jekyll and Bundler (as your user, not root):
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrcecho 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrcsource ~/.bashrcgem install jekyll bundlerjekyll -vCreate the site and build _site:
cd ~ && jekyll new my-blog && cd my-blogbundle exec jekyll buildServe _site with Nginx (adjust server_name):
sudo mkdir -p /var/www/my-blogsudo rsync -a ~/my-blog/_site/ /var/www/my-blog/sudo tee /etc/nginx/sites-available/my-blog >/dev/null <<'EOF'server { listen 80; server_name example.com; root /var/www/my-blog; index index.html;}EOFsudo ln -sf /etc/nginx/sites-available/my-blog /etc/nginx/sites-enabled/my-blogsudo nginx -t && sudo systemctl reload nginx
Tips
- After edits:
bundle exec jekyll buildthen rsync_site/again. - Add HTTPS with Certbot once DNS points at the VPS.
ext step
Ship your blog on a clean VPS: Deploy your Cloud VPS.