Join Framework static documentation powered by Hugo and the Hugo Book theme.
- Hugo version 0.158.0 or higher (standard or extended)
- Git
Ubuntu/Debian:
wget https://github.com/gohugoio/hugo/releases/download/v0.167.0/hugo_0.167.0_linux-amd64.deb
sudo dpkg -i hugo_0.167.0_linux-amd64.debWindows:
choco install hugo-extendedmacOS:
brew install hugoWarning: If your package manager provides an older version of Hugo (< 0.158.0), you may need to install manually from the Hugo releases page.
Clone the repository:
git clone --recurse-submodules https://github.com/joinframework/join-www.gitMove to the created folder:
cd join-wwwhugo server -D --bind 0.0.0.0The site will be available at http://<machine-ip-address>:1313.
join-www/
├── .github/workflows/ # CI (build on pull requests) and CD (deploy on main)
├── archetypes/
│ └── default.md # Template used by `hugo new`
├── config.toml # Hugo configuration
├── content/ # Documentation content (Markdown)
│ ├── _index.md # Site home page
│ └── docs/
│ ├── _index.md # Documentation overview
│ ├── quickstart/
│ │ └── _index.md # Quick start guide
│ └── modules/
│ ├── _index.md # Modules overview
│ ├── core/ # Core module (networking, threads, reactor, etc.)
│ ├── crypto/ # Crypto module (hashing, signatures, TLS, etc.)
│ ├── data/ # Data module (JSON, MessagePack, compression)
│ ├── fabric/ # Fabric module (interface mgmt, ARP, DNS)
│ └── services/ # Services module (HTTP, SMTP, etc.)
├── static/
│ └── images/ # Images used by the pages
├── themes/
│ └── hugo-book/ # Theme (Git submodule)
└── public/ # Generated site (ignored by Git)
# Create a page in an existing module
hugo new docs/modules/core/new-class.md
# Create a new section
mkdir -p content/docs/new-section
hugo new docs/new-section/_index.md
hugo new docs/new-section/page1.mdNote: new pages are created with
draft: true. Drafts are shown byhugo server -Dbut are not published: remove thedraftline once the page is ready.
Simply edit the .md files in content/docs/. Example:
---
title: "Page Title"
weight: 10
---
# My Documentation
Content in Markdown...
## Code Example
```cpp
// libjoin.
#include <join/socket.hpp>
using namespace join;
int main()
{
// Your code
}
```Code examples should be complete and compile as shown. Use the protocol aliases
(Tcp::Socket, Http::Server...) and group the includes like the Join sources:
// libjoin., // Libraries., // C++. then // C., each group sorted from the longest line to the shortest.
- title: Page title (appears in menu)
- weight: Display order (lower = higher in menu)
- bookFlatSection:
trueto display sub-pages at the same level - bookCollapseSection:
trueto collapse section by default - bookHidden:
trueto hide page from menu
The sidebar menu is automatically built from:
- Folder structure in
content/docs/ - The
weightparameter of each page (ascending order) _index.mdfiles create sections
Structure example:
content/docs/
├── _index.md (weight: 1)
├── quickstart/
│ └── _index.md (weight: 1)
└── modules/
├── _index.md (weight: 2)
├── core/
│ ├── _index.md (weight: 1)
│ ├── reactor.md
│ ├── socket.md
│ └── ...
├── crypto/
│ ├── _index.md (weight: 2)
│ ├── digest.md
│ └── ...
├── data/
│ ├── _index.md (weight: 3)
│ └── ...
├── fabric/
│ ├── _index.md (weight: 4)
│ └── ...
└── services/
├── _index.md (weight: 5)
└── ...
Use Hugo shortcodes to create relative links:
See the [crypto module]({{< ref "crypto" >}})To generate the static site in the public/ folder:
hugoThe site is built and deployed by GitHub Actions:
- CI (
.github/workflows/ci.yml) — every pull request tomainis built withhugo --minify - CD (
.github/workflows/cd.yml) — every push tomainis built and deployed to the web server withrsync
The deployment target and SSH key are provided by the repository secrets
(JOIN_DEPLOY_DEST, JOIN_DEPLOY_PORT, JOIN_DEPLOY_KEY, JOIN_DEPLOY_KNOWN_HOST).
Both workflows rely on the reusable .github/workflows/build.yml and can also be started manually
(workflow_dispatch). Starting CD manually always deploys for real. To check a deployment without
changing the server, start build.yml directly with deploy and dry_run both enabled
(rsync --dry-run).
# Generate the site
hugo
# Copy to web server
rsync -avz --delete public/ user@server:/var/www/join-www/- Install the "Remote - SSH" extension in VS Code
- Connect:
F1→ "Remote-SSH: Connect to Host" →user@server - Open folder:
File→Open Folder→/path/to/join-www - Start server in integrated terminal:
hugo server -D --bind 0.0.0.0 - VS Code will automatically offer to forward port 1313
- Create a branch for your changes
- Add or modify content in
content/docs/ - Test locally with
hugo server -D - Commit only source files (not the
public/folder) - Create a Pull Request