Skip to content
This repository was archived by the owner on Dec 28, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Some tips for you:
1. If this is your first time to submit PR, please read the
[contributing guidelines](https://github.com/apache/incubator-hugegraph-doc/blob/master/contribution.md)
[contributing guidelines](https://github.com/apache/hugegraph-doc/blob/master/contribution.md)
2. If a PR fix/close an issue, type the message "close xxx" below (Remember to update both EN & CN doc)
Expand All @@ -15,4 +15,3 @@
- close #xxx <!-- or "fix #xxx", "link #xxx" -->

<!-- Better to paste the screenshot diff here, "xxx" is the ID-link of related issue, e.g: #1024 -->

3 changes: 3 additions & 0 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
restore-keys: |
${{ runner.os }}-hugomod-

- name: Check Links
run: bash dist/validate-links.sh

- name: Build Site (minify)
run: npm i && hugo --minify

Expand Down
44 changes: 24 additions & 20 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ${{ matrix.os }}
env:
SCRIPT_PATH: hugegraph-dist/scripts/
URL_PREFIX: https://dist.apache.org/repos/dist/dev/incubator/hugegraph/
URL_PREFIX: https://dist.apache.org/repos/dist/dev/hugegraph/
USER: ${{ inputs.gpg_user }}
# TODO: parse version from the running branch name & also adapt the input version
RELEASE_VERSION: ''
Expand Down Expand Up @@ -70,6 +70,10 @@ jobs:
if [[ ${{ matrix.os }} =~ "ubuntu" ]]; then
sudo apt-get install -y subversion
fi
if ! svn ls "${URL_PREFIX}/${{ inputs.release_version }}/" >/dev/null 2>&1; then
echo "Release path not found: ${URL_PREFIX}/${{ inputs.release_version }}/" && exit 1
fi
echo "Using SVN prefix: ${URL_PREFIX}"
rm -rf dist/${{ inputs.release_version }}
svn co ${URL_PREFIX}/${{ inputs.release_version }} dist/${{ inputs.release_version }}

Expand All @@ -80,7 +84,7 @@ jobs:
shasum --version 1>/dev/null || exit
gpg --version 1>/dev/null || exit

wget https://downloads.apache.org/incubator/hugegraph/KEYS || exit
wget https://downloads.apache.org/hugegraph/KEYS || exit
echo "Import KEYS:" && gpg --import KEYS
# TODO: how to trust all public keys in gpg list, currently only trust the first one
echo -e "5\ny\n" | gpg --batch --command-fd 0 --edit-key $USER trust
Expand Down Expand Up @@ -110,25 +114,25 @@ jobs:
for i in *src.tar.gz; do
echo "$i"

# 4.1 check the directory name include "incubating"
if [[ ! "$i" =~ "incubating" ]]; then
echo "The package name $i should include incubating" && exit 1
# 4.1 package naming should follow post-graduation TLP naming
if [[ ! "$i" =~ ^apache-hugegraph ]]; then
echo "The package name $i should start with apache-hugegraph" && exit 1
fi
if [[ "$i" =~ "incubating" ]]; then
echo "The package name $i should not contain incubating in post-graduation releases" && exit 1
fi

tar xzvf "$i" || exit
pushd "$(basename "$i" .tar.gz)" || exit
echo "Start to check the package content: $(basename "$i" .tar.gz)"

# 4.2 check the directory include "NOTICE" and "LICENSE" and "DISCLAIMER" file
# 4.2 check the directory include "NOTICE" and "LICENSE" file
if [[ ! -f "LICENSE" ]]; then
echo "The package should include LICENSE file" && exit 1
fi
if [[ ! -f "NOTICE" ]]; then
echo "The package should include NOTICE file" && exit 1
fi
if [[ ! -f "DISCLAIMER" ]]; then
echo "The package should include DISCLAIMER file" && exit 1
fi

# 4.3: ensure doesn't contains ASF CATEGORY X License dependencies in LICENSE and NOTICE files
COUNT=$(grep -E "$CATEGORY_X" LICENSE NOTICE | wc -l)
Expand Down Expand Up @@ -191,7 +195,7 @@ jobs:
cd dist/${{ inputs.release_version }} || exit

ls -lh
pushd ./*hugegraph-incubating*src/hugegraph-server/*hugegraph*${{ inputs.release_version }} || exit
pushd ./*hugegraph*${{ inputs.release_version }}*src/hugegraph-server/*hugegraph-server*${{ inputs.release_version }}* || exit
bin/init-store.sh || exit
sleep 3
bin/start-hugegraph.sh || exit
Expand Down Expand Up @@ -233,7 +237,7 @@ jobs:
popd || exit
popd || exit
# stop server
pushd ./*hugegraph-incubating*src/hugegraph-server/*hugegraph*${{ inputs.release_version }} || exit
pushd ./*hugegraph*${{ inputs.release_version }}*src/hugegraph-server/*hugegraph-server*${{ inputs.release_version }}* || exit
bin/stop-hugegraph.sh || exit
popd || exit

Expand All @@ -253,26 +257,26 @@ jobs:

echo "$i"

# 7.1 check the directory name include "incubating"
if [[ ! "$i" =~ "incubating" ]]; then
echo "The package name $i should include incubating" && exit 1
# 7.1 package naming should follow post-graduation TLP naming
if [[ ! "$i" =~ ^apache-hugegraph ]]; then
echo "The package name $i should start with apache-hugegraph" && exit 1
fi
if [[ "$i" =~ "incubating" ]]; then
echo "The package name $i should not contain incubating in post-graduation releases" && exit 1
fi

tar xzvf "$i" || exit
pushd "$(basename "$i" .tar.gz)" || exit
ls -lh
echo "Start to check the package content: $(basename "$i" .tar.gz)"

# 7.2 check root dir include "NOTICE"/"LICENSE"/"DISCLAIMER" & "licenses" dir
# 7.2 check root dir include "NOTICE"/"LICENSE" & "licenses" dir
if [[ ! -f "LICENSE" ]]; then
echo "The package should include LICENSE file" && exit 1
fi
if [[ ! -f "NOTICE" ]]; then
echo "The package should include NOTICE file" && exit 1
fi
if [[ ! -f "DISCLAIMER" ]]; then
echo "The package should include DISCLAIMER file" && exit 1
fi
if [[ ! -d "licenses" ]]; then
echo "The package should include licenses dir" && exit 1
fi
Expand Down Expand Up @@ -302,7 +306,7 @@ jobs:
cd dist/${{ inputs.release_version }} || exit

# TODO: run pd & store
pushd ./*hugegraph-incubating*${{ inputs.release_version }}/*hugegraph-server-incubating*${{ inputs.release_version }} || exit
pushd ./*hugegraph*${{ inputs.release_version }}*/*hugegraph-server*${{ inputs.release_version }}* || exit
bin/init-store.sh || exit
sleep 3
bin/start-hugegraph.sh || exit
Expand Down Expand Up @@ -341,7 +345,7 @@ jobs:

popd || exit
# stop server
pushd ./*hugegraph-incubating*${{ inputs.release_version }}/*hugegraph-server-incubating*${{ inputs.release_version }} || exit
pushd ./*hugegraph*${{ inputs.release_version }}*/*hugegraph-server*${{ inputs.release_version }}* || exit
bin/stop-hugegraph.sh || exit
popd || exit

Expand Down
203 changes: 71 additions & 132 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,171 +1,110 @@
# AI Development Agent Instructions
# AGENTS.md

This file provides guidance to AI coding assistants (Claude Code, Cursor, GitHub Copilot, etc.) when working with code in this repository.

## Project Overview

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.
Apache HugeGraph documentation website built with Hugo static site generator and the Docsy theme. The site is bilingual (Chinese/English) and covers the complete HugeGraph graph database ecosystem.

The documentation is multilingual, supporting both **Chinese (cn)** and **English (en)** content.

## Development Setup

### Prerequisites

1. **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/bin` or `/usr/local/bin`

2. **Node.js and npm** (v16+ as specified in CI)

### Quick Start
## Development Commands

```bash
# Install npm dependencies (autoprefixer, postcss, postcss-cli)
# Install dependencies
npm install

# Start local development server (with auto-reload)
# Start development server (auto-reload enabled)
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
```

## Project Structure

### Key Directories

- **`content/`** - All documentation content in Markdown
- `content/cn/` - Chinese (simplified) documentation
- `content/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 by `hugo` build)

- **`dist/`** - Additional distribution files

### Important 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)
# Clean build
rm -rf public/

- **`contribution.md`** - Contributing guide (Chinese/English mixed)
# Production build with garbage collection
HUGO_ENV="production" hugo --gc

- **`maturity.md`** - Project maturity assessment documentation
# Custom server configuration
hugo server -b http://127.0.0.1 -p 80 --bind=0.0.0.0
```

## Content Organization
## Prerequisites

Documentation is organized into major sections:
- **Hugo Extended** v0.95.0 recommended (v0.102.3 in CI) - must be the "extended" version for SASS/SCSS support
- **Node.js** v16+ and npm
- Download Hugo from: https://github.com/gohugoio/hugo/releases

- **`quickstart/`** - Getting started guides for HugeGraph components (Server, Loader, Hubble, Tools, Computer, AI)
- **`config/`** - Configuration documentation
- **`clients/`** - Client API documentation (Gremlin Console, RESTful API)
- **`guides/`** - User guides and tutorials
- **`performance/`** - Performance benchmarks and optimization
- **`language/`** - Query language documentation
- **`contribution-guidelines/`** - How to contribute to HugeGraph
- **`changelog/`** - Release notes and version history
- **`download/`** - Download links and instructions
## Architecture

## Common Tasks
```
content/
├── cn/ # Chinese documentation (default language)
│ ├── docs/ # Main documentation
│ ├── blog/ # Blog posts
│ ├── community/
│ └── about/
└── en/ # English documentation (parallel structure)

themes/docsy/ # Docsy theme (submodule)
layouts/ # Custom template overrides
assets/ # Processed assets (SCSS, images)
static/ # Static files served directly
config.toml # Main site configuration
```

### Building and Testing
### Content Structure

```bash
# Build for production (with minification)
hugo --minify
Documentation sections in `content/{cn,en}/docs/`:
- `quickstart/` - Getting started guides for HugeGraph components
- `config/` - Configuration documentation
- `clients/` - Client API documentation (Gremlin, RESTful)
- `guides/` - User guides and tutorials
- `performance/` - Benchmarks and optimization
- `language/` - Query language docs
- `contribution-guidelines/` - Contributing guides
- `changelog/` - Release notes
- `download/` - Download instructions

# Clean previous build
rm -rf public/
## Key Configuration Files

# Build with specific environment
HUGO_ENV="production" hugo --gc
```
- `config.toml` - Site-wide settings, language config, menu structure, version (currently 0.13)
- `package.json` - Node dependencies for CSS processing (postcss, autoprefixer, mermaid)
- `.editorconfig` - UTF-8, LF line endings, spaces for indentation

### Working with Content
## Working with Content

When editing documentation:

1. Maintain parallel structure between `content/cn/` and `content/en/`
2. Use Markdown format for all documentation files
3. Include front matter in each file (title, weight, description)
4. For translated content, ensure both Chinese and English versions are updated

### Theme Customization

- 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](https://www.docsy.dev/docs/) for theme customization details.
2. Use Markdown with Hugo front matter (title, weight, description)
3. For bilingual changes, update both Chinese and English versions
4. Include mermaid diagrams where appropriate (mermaid.js is available)

## Deployment

The site uses GitHub Actions for CI/CD (`.github/workflows/hugo.yml`):

1. **Triggers**: On push to `master` branch or pull requests
2. **Build process**:
- Checkout with submodules (for themes)
- Setup Node v16 and Hugo v0.102.3 extended
- Run `npm i && hugo --minify`
3. **Deployment**: Publishes to `asf-site` branch (GitHub Pages)

The deployed site is hosted as part of Apache HugeGraph's documentation infrastructure.

## HugeGraph Architecture Context

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
- **CI/CD**: GitHub Actions (`.github/workflows/hugo.yml`)
- **Trigger**: Push to `master` branch or pull requests
- **Build**: `npm i && hugo --minify` with Node v16 and Hugo v0.102.3 extended
- **Deploy**: Publishes to `asf-site` branch (GitHub Pages)
- **PR Requirements**: Include screenshots showing before/after changes

## Git Workflow
## HugeGraph Ecosystem Context

- **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 `master` for changes
- Deployment to `asf-site` branch is automated via GitHub Actions
This documentation covers:
- **HugeGraph-Server** - Core graph database with REST API
- **HugeGraph-Store** - Distributed storage engine
- **HugeGraph-PD** - Placement Driver for metadata
- **Toolchain** - Client, Loader, Hubble (web UI), Tools
- **HugeGraph-Computer** - Distributed OLAP graph processing
- **HugeGraph-AI** - GNN, LLM/RAG components

## Troubleshooting

**Error: "TOCSS: failed to transform scss/main.scss"**
- Cause: Using standard Hugo instead of Hugo Extended
- Solution: Install Hugo Extended version
**"TOCSS: failed to transform scss/main.scss"**
- Install Hugo Extended (not standard Hugo)

**Error: Module/theme not found**
- Cause: Git submodules not initialized
- Solution: `git submodule update --init --recursive`
**Theme/module not found**
- Run: `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)
**CI build fails but works locally**
- Match Hugo version (v0.102.3) and Node.js (v16)
- Verify npm dependencies are installed
Loading