Skip to content

Hosting docs.diasantos.com

This documentation is built with MkDocs (Material theme). Output is static HTML under documentation/site/ after mkdocs build.

Same server as the app

Typical layout:

Path Purpose
App clone e.g. /var/www/coaching — Next.js + pm2
Docs build e.g. /var/www/coaching/documentation/site — nginx root

Build after git pull

Either run manually or add a small script / CI step:

cd /var/www/coaching/documentation
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
mkdocs build

Nginx example

Point server_name at your docs host and root at the site directory:

server {
    listen 443 ssl http2;
    server_name docs.diasantos.com;

    ssl_certificate     /etc/letsencrypt/live/docs.diasantos.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/docs.diasantos.com/privkey.pem;

    root /var/www/coaching/documentation/site;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }
}

Obtain certificates with certbot (or your usual ACME workflow) for docs.diasantos.com.

Optional: separate deploy

You can rsync only documentation/site/ to a static host or CDN if you prefer not to serve docs from the application server.