No description
  • CSS 46.3%
  • HTML 39%
  • JavaScript 14.7%
Find a file
2026-05-25 06:15:40 +02:00
api Add font cache for a year. 2026-05-25 06:15:40 +02:00
website Put CSS and fonts in assets/ directory, 2026-05-25 06:15:24 +02:00
.gitignore Initialize Git repo and commit 2026-03-20 15:42:56 +01:00
CLAUDE.md Update CLAUDEs instructions accordingly 2026-05-25 06:06:47 +02:00
README.md Initialize Git repo and commit 2026-03-20 15:42:56 +01:00

Raaijmakers.it

This repository contains the website and API for raaijmakers.it.

Structure

.
├── website/              # Hugo static site
│   ├── content/         # Markdown content files
│   ├── themes/          # Hugo theme(s)
│   ├── static/          # Static assets
│   ├── public/          # Generated site (gitignored)
│   └── hugo.toml        # Hugo configuration
│
├── api/                 # ExpressJS API
│   ├── server.js        # Main API server
│   ├── package.json     # Node dependencies
│   └── .env            # Environment variables (gitignored)
│
├── scripts/             # Deployment and utility scripts
│   └── deploy.sh       # Main deployment script
│
├── deploy.config.sh     # Deployment configuration (gitignored)
└── README.md           # This file

Prerequisites

  • Hugo (for building the website)
  • Node.js (for running the API)
  • rsync (for deployment)
  • SSH access to your deployment server

Local Development

Website

cd website
hugo server -D

Visit http://localhost:1313 to view the site.

API

cd api
cp .env.example .env
# Edit .env with your configuration
npm install
node server.js

Deployment

Initial Setup

  1. Copy the deployment configuration template:

    cp deploy.config.sh.example deploy.config.sh
    
  2. Edit deploy.config.sh and configure your server settings:

    • SSH credentials (user, host, port)
    • Remote paths for website and API
    • API service name (if using systemd)
  3. Make the deployment script executable:

    chmod +x scripts/deploy.sh
    
  4. Ensure your SSH key is set up for passwordless login:

    ssh-copy-id user@your-server.com
    

Deploy

Deploy both website and API:

./scripts/deploy.sh

Deploy only the website:

./scripts/deploy.sh --website-only

Deploy only the API:

./scripts/deploy.sh --api-only

Skip Hugo build (use existing build):

./scripts/deploy.sh --skip-build

How Deployment Works

  1. Website: Hugo builds the site into website/public/, then rsync copies it to the remote server
  2. API: rsync copies the API files (excluding node_modules, .env, etc.) to the remote server and runs npm ci --production

Note for Plesk users: After deployment, restart your Node.js application through:

  • Plesk Panel: Domains > Your Domain > Node.js
  • Or CLI: plesk ext nodejs restart-app <domain>

Server Setup

Plesk Setup

  1. Website:

    • Hugo builds to website/public/ which should be set as your document root in Plesk
    • Or set a specific subdomain for the static site
  2. API:

    • Go to Domains > Your Domain > Node.js
    • Enable Node.js for your domain
    • Set Application Root to your API directory
    • Set Application Startup File to server.js
    • Configure environment variables in Plesk
    • Click "Enable Node.js" and "Restart App"

Alternative: Nginx + systemd

If you're not using Plesk, here's a traditional setup:

Website (Nginx):

server {
    listen 80;
    server_name raaijmakers.it www.raaijmakers.it;
    root /var/www/raaijmakers.it;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
    }
}

API (systemd service):

# Create /etc/systemd/system/raaijmakers-api.service
sudo systemctl enable raaijmakers-api
sudo systemctl start raaijmakers-api

Environment Variables

API

Copy .env.example to .env and configure:

  • Database credentials
  • API keys
  • Port settings
  • etc.

Important: Never commit .env files to version control!

License

Private project