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 Blog with Jekyll

Jekyll turns Markdown into static HTML. On a VPS it fits light blogs with no database or PHP.

Steps

  1. Install Ruby and build dependencies:

    sudo apt update
    sudo apt install -y ruby-full build-essential zlib1g-dev
    ruby -v
  2. Install Jekyll and Bundler (as your user, not root):

    echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
    echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
    source ~/.bashrc
    gem install jekyll bundler
    jekyll -v
  3. Create the site and build _site:

    cd ~ && jekyll new my-blog && cd my-blog
    bundle exec jekyll build
  4. Serve _site with Nginx (adjust server_name):

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

Tips

  • After edits: bundle exec jekyll build then 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.

Related guides