Join Framework static documentation powered by Hugo and the Hugo Book theme.
- Hugo Extended version 0.146.0 or higher
- Git
Ubuntu/Debian:
sudo apt install hugoWindows:
choco install hugo-extendedmacOS:
brew install hugoWarning: If your package manager provides an older version of Hugo (< 0.146.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/
├── config.toml # Hugo configuration
├── content/ # Documentation content (Markdown)
│ ├── _index.md # Documentation 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.)
├── 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.mdSimply edit the .md files in content/docs/. Example:
---
title: "Page Title"
weight: 10
---
# My Documentation
Content in Markdown...
## Code Example
\`\`\`cpp
#include <join/socket.hpp>
int main() {
// Your code
}
\`\`\`- 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:
hugo# 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