No description
  • CSS 63.5%
  • HTML 22.2%
  • JavaScript 13.1%
  • Makefile 0.8%
  • Shell 0.4%
Find a file
2026-05-05 20:15:41 +01:00
content Split ThreeNodeCluster guide into two versions: Docker-based and Bare Metal, improving details on configuration, topology, and deployment steps 2026-05-05 20:15:41 +01:00
themes/nexus-docs Update Nexus branding and improve image rendering in documentation 2026-05-04 19:08:46 +01:00
.gitignore Initial commit: Hugo docs site with nexus-docs theme 2026-05-02 19:22:36 +01:00
deploy.sh Simplify deploy script: streamline output and reload Caddy automatically 2026-05-02 20:50:17 +01:00
hugo.yaml Update Nexus branding and improve image rendering in documentation 2026-05-04 13:43:34 +01:00
Makefile Initial commit: Hugo docs site with nexus-docs theme 2026-05-02 19:22:36 +01:00
README.md Update Caddy config and CSS: adjust deployment paths and increase content width 2026-05-02 21:08:28 +01:00

Nexus GSLB Documentation

Hugo-based documentation site for Nexus GSLB.

Quick start

# Development
make server
# → http://localhost:1313

# Full build (Hugo + Pagefind search index)
make index

# Serve built site locally
cd public && python3 -m http.server 8000
# → http://localhost:8000

Requirements

  • Hugo v0.160.1+ (extended version recommended for SCSS support)
  • Pagefind (for search — installed separately via npm install -g pagefind)

Build commands

Command Description
make build Hugo build only (hugo --gc --minify)
make index Hugo build + Pagefind search index
make server Hugo dev server with live reload
make clean Remove public/ build output

Search is powered by Pagefind. The search index is generated at build time via make index. You must rebuild and reindex after any content changes for search to work.

Deployment

Server setup

# 1. Clone the repo
git clone https://code.rbnsn.uk/joroson/nexus-gslb-documentation.git /root/nexus-gslb-documentation
cd /root/nexus-gslb-documentation

# 2. Install Hugo extended
wget https://github.com/gohugoio/hugo/releases/download/v0.160.1/hugo_extended_0.160.1_linux-amd64.tar.gz
tar -xzf hugo_extended_0.160.1_linux-amd64.tar.gz
sudo mv hugo /usr/local/bin/

# 3. Install Pagefind
npm install -g pagefind

# 4. Initial build
make index

# 5. Reload Caddy
sudo systemctl reload caddy

Caddy configuration

docs.gslb.nexus {
	root * /var/www/docs.gslb.nexus/public

	encode gzip
	file_server
	@static {
		path .js .css .woff2 .svg .png .gz
	}
	handle @static {
		header Cache-Control "public, max-age=31536000, immutable"
	}
	header {
		X-Frame-Options "SAMEORIGIN"
		X-Content-Type-Options "nosniff"
		Referrer-Policy "strict-origin-when-cross-origin"
	}
}

Updating the site

cd /root/nexus-gslb-documentation
./deploy.sh

This script pulls the latest changes, rebuilds the Hugo site, and re-indexes search. No downtime — Caddy continues serving the old build while the new one is written, then swaps instantly.

Project structure

.
├── Makefile               # Build automation
├── deploy.sh             # Server deploy script
├── hugo.yaml             # Hugo config
├── content/              # Documentation source
│   ├── user/             # User guides
│   └── reference/        # API/reference docs
├── themes/               # Custom Hugo theme
│   └── nexus-docs/
└── public/               # Build output (gitignored)

Search index notes

Pagefind indexes the built HTML in public/. The index lives at public/pagefind/. If you serve public/ directly (no --serve flag), search works immediately. If you use a dev server that doesn't write to public/, the index won't be present and search won't function.

Always run make index (not just make build) when deploying.