This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the official website for 云原生社区(中国)/ Cloud Native Community (China), a Hugo-based static site built with the Wowchemy CMS framework. The site serves as a hub for cloud native technology content, community events, and resources in China.
Note: This repository is archived. The site has migrated to cloudnative.jimmysong.io.
- Hugo v0.153.2 (extended version required for SCSS compilation)
- Wowchemy v5 (Hugo theme/modules)
- Netlify (deployment via
netlify.toml) - Giscus (comments system)
- Multi-language support (primary: Chinese/zh, hasCJKLanguage: true)
# Install Hugo extended version (required for SCSS)
# macOS: brew install hugo
# Or download from https://github.com/gohugo/hugo/releases
# Start development server with live reload
hugo server
# Build for production
hugo --gc# Create new blog post using archetype
hugo new blog/my-post-name/index.md
# Create new author page
hugo new authors/my-author-name/_index.md
# Create new event
hugo new event/my-event/index.mdThe site uses Wowchemy's widget-based architecture with Hugo page bundles:
-
content/blog/- Blog posts (each is a directory withindex.md)- Uses
archetypes/blog.mdfor frontmatter template - Supports featured images, authors, translators, tags, categories
- Example frontmatter: title, date, authors, translators, summary, tags, categories, keywords
- Uses
-
content/authors/- Author profiles (directory per author with_index.md)- Uses
archetypes/authors/templates - Each author directory contains
_index.mdwith author bio and info
- Uses
-
content/community/- Community pages (join, contribute, events, SIGs, cities)- Configured with editable mode and breadcrumbs in
config/_default/config.yaml
- Configured with editable mode and breadcrumbs in
-
content/home/- Homepage widgets (hero, slider, features, etc.)- Each file is a headless section with
widget:parameter - Widgets include: slider, hero, featurette, tag cloud, etc.
- Each file is a headless section with
-
content/translators/- Translator profiles (similar structure to authors)
-
config.yaml- Root Hugo config (module mounts, security, markup settings) -
config/_default/config.yaml- Main site config (URL, language, modules, taxonomies)- Uses Wowchemy v5 modules as Git dependencies
- Default language:
zh(Chinese) - Custom taxonomies: tags, categories, authors, translators (custom)
- Permalinks configured for authors, tags, categories
-
config/_default/params.yaml- Wowchemy theme parameters- Theme:
my_theme(custom theme inassets/scss/) - SEO: Google Analytics, Baidu Tongji
- Comments: Giscus integration
- Search: Wowchemy built-in
- Repository URL for "Edit this page" links
- Theme:
-
config/_default/languages.yaml- Language settings- Only Chinese (
zh) configured - Features: code copy, back to top button, anchored headings
- Only Chinese (
-
config/_default/menus.yaml- Site navigation menu structure
layouts/- Custom layout overrides for Wowchemy themelayouts/shortcodes/- Custom Hugo shortcodes (cite, callout, toc, figure, etc.)layouts/partials/- Reusable partial templatescomments/giscus.html- Giscus comment systembook_layout.html,book_menu.html,book_sidebar.html- Book/documentation layoutcode-copy.html- Copy button for code blocksback-to-top.html- Back to top button
layouts/partials/functions/- Custom Hugo template functionslayouts/section/- Section-specific layouts
-
assets/scss/- Custom SCSS stylingcustom.scss- Main custom styles (overrides Wowchemy defaults)- Custom TOC styling, code copy buttons
- Responsive design tweaks
- Dark mode adjustments
- Sponsor image styling
main.scss- Imports custom stylesbootstrap_variables.scss- Bootstrap variable overrideswowchemy/- Wowchemy SCSS overrides
-
assets/css/,assets/js/- Additional static assets
data/- TOML/YAML data files for Wowchemyi18n/- Internationalization stringsfonts/- Font configurationthemes/- Theme presetsassets.toml- Asset bundles configurationpage_sharer.toml- Social sharing buttons
static/- Static files served at rootimg/- Imageswebfonts/- Custom web fontsplugins/- Third-party libraries- Verification files for search engines
Blog posts use this frontmatter structure:
---
title: "Post Title"
date: YYYY-MM-DDTHH:MM:SS+08:00
draft: false
authors: ["Author Name"]
translators: ["Translator Name"] # Optional, for translated posts
summary: "Post summary/excerpt"
tags: ["tag1", "tag2"]
categories: ["category"]
keywords: ["keyword1", "keyword2"]
---- Giscus (GitHub Discussions-based) configured in
params.yaml - Repository:
cloudnativeto/cloudnative.to - Lazy loading enabled
- Partial:
layouts/partials/comments/giscus.html
- translators - Custom taxonomy for crediting translators (in addition to authors)
- Configured in both
config/_default/config.yaml(taxonomies) and rootconfig.yaml(implied via content structure)
- Custom book layout with sidebar navigation
- Files in
layouts/book/,layouts/partials/book_*.html - Used for structured content organization
- Primary language: Chinese (
zh) hasCJKLanguage: truefor proper Chinese word countingdefaultContentLanguageInSubdir: false- Chinese content at root, not/zh/
- Netlify via
netlify.toml - Build command:
hugo --gc(includes garbage collection) - Publish directory:
public - Hugo version: 0.101.0 (Netlify environment)
- Local development requires Hugo v0.153.2 extended
- Site is archived and migrated to cloudnative.jimmysong.io
- Content is licensed under CC BY-NC-SA 4.0
- All blog posts should use the PR template declaration from
.github/PULL_REQUEST_TEMPLATE.md - Images should be optimized (recent commit shows media asset optimization)
- Baidu verification code present in
static/