For the short workflow, start with README.md. This file records the production-equivalent checks for changes to the documentation website.
- Build the site with the strict production command and keep the complete exit status.
- Update both
content/en/andcontent/cn/when the change applies to both languages. - Include before/after screenshots for visual or navigation changes.
- Preserve public English routes under
/docs/...and Chinese routes under/cn/docs/.... - Link the related issue when one exists.
The site uses the Hugo Module recorded in go.mod and go.sum:
Go: 1.27.0 or newer
Hugo Extended: 0.165.0
OINK: v1.0.0
Node.js, npm, PostCSS, and a vendored Docsy checkout are not part of the build.
Verify the resolved theme before editing:
hugo version
go version
hugo mod graphThe module graph must contain exactly the pinned github.com/pgsty/oink@v1.0.0 dependency for this site.
git clone https://github.com/apache/hugegraph-doc.git
cd hugegraph-doc
scripts/hugo.sh serverOpen http://localhost:1313/. The local preview includes the language-aware search index so search behavior can be checked before publication.
Run the same warning-strict build used by CI:
scripts/hugo.sh buildThe wrapper derives the complete version menu from versions.json before
starting Hugo. Additional Hugo arguments are passed through unchanged, for
example scripts/hugo.sh server -p 8080. Set HG_DOC_VERSION,
HG_DOC_SITE_ORIGIN, or HG_DOC_HISTORICAL_ORIGIN only when validating a
specific version or publication origin.
The wrapper applies Hugo's configuration, environment, strict-warning,
cleanup, and minification flags before your arguments; Hugo's last-wins flag
handling means anything you append (for example --logLevel debug) takes
effect. Use --baseURL or HG_DOC_SITE_ORIGIN when changing the rendered
origin (the flag wins when both are set); a server --port is reflected in
the generated local origin.
A successful command proves that Hugo rendered the configured outputs. It does not replace browser checks for navigation, search, language switching, accessibility, mobile layout, print, or Content Security Policy behavior.
content/en/andcontent/cn/contain the bilingual source pages.hugo.yamlowns routing, languages, outputs, search, navigation, and OINK parameters.data/home/<language>.yamlowns the bilingual homepage.data/footer/<language>.yamlowns the bilingual footer.i18n/zh-CN.yamlcarries the Simplified Chinese OINK interface catalogue for the preservedcnURL language key; the file is named after thezh-CNlocale because Hugo resolves translations by locale, not by the URL key.assets/andstatic/contain site-owned brand and compatibility assets.
OINK is a module dependency. Do not copy or edit generated module-cache files. Site-specific overrides belong in the corresponding root layouts/, assets/, or data path and require focused regression evidence.
提交前请同时检查中英文页面、公开 URL、搜索结果和语言切换。视觉或导航变更必须提供修改前后的桌面与移动端截图。构建成功只证明模板可以渲染,不能替代真实浏览器、无障碍、打印和 CSP 检查。