This guide explains how to build and test the Valkey website locally, including all content from the valkey-doc repository.
-
Zola - Static site generator
# macOS brew install zola # Or download from https://www.getzola.org/documentation/getting-started/installation/
-
Local copies of repositories - All repos should be in the same parent directory:
~/projects/ ├── valkey-io.github.io/ (this repo) └── valkey-doc/ (documentation repo)
cd ~/projects # or your preferred directory
# Clone the website repo (if you haven't already)
git clone https://github.com/valkey-io/valkey-io.github.io.git
# Clone the documentation repo
git clone https://github.com/valkey-io/valkey-doc.gitFrom the valkey-io.github.io directory:
# Run the init script to create symlinks
./build/init-topics-and-clients.sh ../valkey-doc/topics \
../valkey-doc/clients
# Start Zola development server with extra watch path for client symlinks
zola serve --extra-watch-path build-clientsOpen your browser to http://127.0.0.1:1111/
The init-topics-and-clients.sh script:
- Creates symlinks in the website directory:
build-topics→../valkey-doc/topicsbuild-clients→../valkey-doc/clients
- Creates stub files for topics (allows Zola to generate pages)
- Copies topic images to the content directory
- Client Libraries: http://127.0.0.1:1111/clients/
- Documentation Topics: http://127.0.0.1:1111/topics/
- Commands: http://127.0.0.1:1111/commands/ (requires additional setup - see main README.md)
- Edit the relevant file under
content/for introductory text - Edit the matching template under
templates/for layout changes - Zola will automatically reload
- Check Zola is installed:
zola --version - Make sure you're in the
valkey-io.github.iodirectory - Check for syntax errors in config.toml
- Stop Zola (Ctrl+C)
- Re-run the init script (symlinks may have been removed)
- Restart Zola:
zola serve --extra-watch-path build-clients - Hard refresh browser (Cmd+Shift+R or Ctrl+Shift+R)
To build static files without running a server:
# Run init script first
./build/init-topics-and-clients.sh ../valkey-doc/topics \
../valkey-doc/clients
# Build static site
zola build
# Output will be in ./public/To remove generated files and symlinks:
# Remove symlinks
rm -f build-topics build-clients
# Remove generated topic stub files
rm -f content/topics/*.md
# Remove Zola build output
rm -rf public/- Zola Documentation
- Main README - Full website build instructions