Skip to content

zeromicro/autodoc

Repository files navigation

go-zero Documentation Site

The source for go-zero.dev — the official documentation website for the go-zero microservices framework.

Deploy to GitHub Pages


Overview

This repository contains the full source of the go-zero documentation site, built with Astro and the Starlight documentation theme. It provides bilingual documentation (English + Simplified Chinese) covering concepts, tutorials, components, API reference, and more.

Live site: https://go-zero.dev


Tech Stack

Technology Version Purpose
Astro 5.6.x Site framework
Starlight 0.37.x Documentation theme
GitHub Pages Hosting
GitHub Actions CI/CD

Getting Started

Prerequisites

Local Development

# Clone the repo
git clone https://github.com/zeromicro/autodoc.git
cd autodoc

# Install dependencies
npm ci

# Start the dev server
npm run dev

The site will be available at http://localhost:4321.

Build

npm run build

The static output is generated into the dist/ directory.

Preview Production Build

npm run preview

Project Structure

autodoc/
├── .github/
│   ├── workflows/
│   │   ├── deploy.yml            # Auto-deploy to GitHub Pages on push to main
│   │   └── sync-release.yml      # Auto-sync go-zero release notes (weekly)
│   ├── copilot-instructions.md   # AI documentation writing conventions
│   └── SITE_IMPLEMENTATION_GUIDE.md
├── public/
│   ├── CNAME                     # Custom domain: go-zero.dev
│   └── favicon.svg
├── scripts/
│   └── check_links.py            # Internal link checker utility
├── src/
│   ├── assets/                   # Images and SVG diagrams
│   └── content/
│       └── docs/                 # All documentation content
│           ├── index.mdx         # English homepage
│           ├── concepts/         # Core concepts & architecture
│           ├── getting-started/  # Installation & quickstart
│           ├── guides/           # Step-by-step guides (HTTP, gRPC, DB, etc.)
│           ├── components/       # Built-in components (resilience, cache, etc.)
│           ├── reference/        # goctl CLI, DSL syntax, configuration, releases
│           ├── community/        # FAQ, contributing, code examples
│           └── zh-cn/            # Simplified Chinese translations (mirrors above)
├── astro.config.mjs              # Astro + Starlight configuration
├── package.json
└── tsconfig.json

Documentation Structure

Section Path Description
Concepts concepts/ Architecture overview, design principles, project structure, glossary
Getting Started getting-started/ Environment setup, goctl installation, first project
Guides guides/ Step-by-step guides for HTTP, gRPC, databases, microservices, deployment
Components components/ Built-in components: rate limiter, circuit breaker, cache, queue, observability
Reference reference/ goctl CLI, DSL syntax, configuration reference, release notes
Community community/ FAQ, contributing guidelines, code examples

All sections are available in both English (/) and Simplified Chinese (/zh-cn/).


Contributing

Contributions to improve the documentation are welcome! You can:

  • Fix typos or clarify explanations
  • Add missing content or examples
  • Improve Chinese translations
  • Report issues via GitHub Issues

Making Changes

  1. Fork this repository
  2. Create a branch: git checkout -b docs/your-improvement
  3. Edit files under src/content/docs/
  4. Run npm run dev to preview locally
  5. Open a pull request

Automated Workflows

Deploy (deploy.yml)

Every push to main automatically builds and deploys the site to GitHub Pages. The deploy typically takes 1–2 minutes.

Release Notes Sync (sync-release.yml)

Every Monday, a workflow checks for new go-zero releases and opens a pull request with an AI-generated changelog entry. Can also be triggered manually with a specific version tag.


License

Documentation content is licensed under CC BY 4.0.

About

AI generated doc for go-zero.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors