This file provides guidance to AI coding assistants (Claude Code, Cursor, GitHub Copilot, etc.) when working with code in this repository.
This is the Apache HugeGraph documentation website repository (hugegraph-doc), built with Hugo static site generator using the Docsy theme. The site provides comprehensive documentation for the HugeGraph graph database system, including quickstart guides, API references, configuration guides, and contribution guidelines.
The documentation is multilingual, supporting both Chinese (cn) and English (en) content.
-
Hugo Extended (v0.95.0 recommended, v0.102.3 used in CI)
- Must be the "extended" version (includes SASS/SCSS support)
- Download from: https://github.com/gohugoio/hugo/releases
- Install location:
/usr/binor/usr/local/bin
-
Node.js and npm (v16+ as specified in CI)
# Install npm dependencies (autoprefixer, postcss, postcss-cli)
npm install
# Start local development server (with auto-reload)
hugo server
# Custom server with different ip/port
hugo server -b http://127.0.0.1 -p 80 --bind=0.0.0.0
# Build production site (output to ./public)
hugo --minify-
content/- All documentation content in Markdowncontent/cn/- Chinese (simplified) documentationcontent/en/- English documentation- Each language has parallel structure:
docs/,blog/,community/,about/
-
themes/docsy/- The Docsy Hugo theme (submodule or vendored) -
static/- Static assets (images, files) served directly -
assets/- Assets processed by Hugo pipelines (SCSS, images for processing) -
layouts/- Custom Hugo template overrides for the Docsy theme -
public/- Generated site output (gitignored, created byhugobuild) -
dist/- Additional distribution files
-
config.toml- Main site configuration- Defines language settings (cn as default, en available)
- Menu structure and navigation
- Theme parameters and UI settings
- Currently shows version
0.13
-
package.json- Node.js dependencies for CSS processing (postcss, autoprefixer) -
.editorconfig- Code style rules (UTF-8, LF line endings, spaces for indentation) -
contribution.md- Contributing guide (Chinese/English mixed) -
maturity.md- Project maturity assessment documentation
Documentation is organized into major sections:
quickstart/- Getting started guides for HugeGraph components (Server, Loader, Hubble, Tools, Computer, AI)config/- Configuration documentationclients/- Client API documentation (Gremlin Console, RESTful API)guides/- User guides and tutorialsperformance/- Performance benchmarks and optimizationlanguage/- Query language documentationcontribution-guidelines/- How to contribute to HugeGraphchangelog/- Release notes and version historydownload/- Download links and instructions
# Build for production (with minification)
hugo --minify
# Clean previous build
rm -rf public/
# Build with specific environment
HUGO_ENV="production" hugo --gcWhen editing documentation:
- Maintain parallel structure between
content/cn/andcontent/en/ - Use Markdown format for all documentation files
- Include front matter in each file (title, weight, description)
- For translated content, ensure both Chinese and English versions are updated
- Global site config:
config.toml(root directory) - Theme-specific config:
themes/docsy/config.toml - Custom layouts: Place in
layouts/to override theme defaults - Custom styles: Modify files in
assets/directory
Refer to Docsy documentation for theme customization details.
The site uses GitHub Actions for CI/CD (.github/workflows/hugo.yml):
- Triggers: On push to
masterbranch or pull requests - Build process:
- Checkout with submodules (for themes)
- Setup Node v16 and Hugo v0.102.3 extended
- Run
npm i && hugo --minify
- Deployment: Publishes to
asf-sitebranch (GitHub Pages)
The deployed site is hosted as part of Apache HugeGraph's documentation infrastructure.
This documentation covers the complete HugeGraph ecosystem:
- HugeGraph-Server - Core graph database engine with REST API
- HugeGraph-Store - Distributed storage engine with integrated computation
- HugeGraph-PD - Placement Driver for metadata management
- HugeGraph-Toolchain:
- Client (Java RESTful API client)
- Loader (data import tool)
- Hubble (web visualization platform)
- Tools (deployment and management utilities)
- HugeGraph-Computer - Distributed graph processing system (OLAP)
- HugeGraph-AI - Graph neural networks and LLM/RAG components
- Main branch:
master(protected, triggers deployment) - PR requirements: Include screenshots showing before/after changes in documentation
- Commit messages: Follow Apache commit conventions
- Always create a new branch from
masterfor changes - Deployment to
asf-sitebranch is automated via GitHub Actions
Error: "TOCSS: failed to transform scss/main.scss"
- Cause: Using standard Hugo instead of Hugo Extended
- Solution: Install Hugo Extended version
Error: Module/theme not found
- Cause: Git submodules not initialized
- Solution:
git submodule update --init --recursive
Build fails in CI but works locally
- Check Hugo version match (CI uses v0.102.3)
- Ensure npm dependencies are installed
- Verify Node.js version (CI uses v16)