Skip to content

docs: add from-scratch tutorials for Go CLI project and docs site - #25

Merged
qdriven merged 1 commit into
mainfrom
24-from-scratch-tutorials
Oct 21, 2026
Merged

qdriven merged 1 commit into
mainfrom
24-from-scratch-tutorials

Conversation

@qdriven

@qdriven qdriven commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Closes #24

Adds two hands-on, beginner-friendly tutorials (zh + en mirrors) covering both halves of the issue:

Part 1 — Go CLI project from scratch

docs/{zh,en}/quick-start/golang-project-from-scratch.md

  • How go mod init generates go.mod, explained line by line (module / go / require / go.sum)
  • The third-party dependency stack (Cobra / Viper / PTerm / Bubble Tea / Ginkgo / sqlite / yaml) and how to install them
  • The standard directory structure with each directory's purpose (cmd/ / internal/ / pkg/ / scripts/)
  • A first Cobra subcommand modeled on cmd/magic/flush_dns.go
  • A Taskfile walkthrough (vars, platforms, internal tasks, cross-build) plus a minimal copy-paste template
  • Installable SKILL: golang-project-from-scratch

Part 2 — Docs site from scratch

docs/{zh,en}/quick-start/docs-site-from-scratch.md

  • npm init walkthrough with every package.json field explained (+ Go↔Node mapping table)
  • Installing docmd and plugins, docmd.config.js explained
  • Organizing docs: navigation.json, bilingual i18n rules
  • Publishing to GitHub Pages via the repo's .github/workflows/docs.yml (full workflow + Pages settings steps)
  • Installable SKILL: docs-site-from-scratch

Also registers both pages in docs/{zh,en}/navigation.json and records the work as section 9 in AGENTS.md.

Verified with npx docmd build: 60 pages generated, all 4 new pages render in both locales with correct sidebar entries.

🤖 Generated with Claude Code

- docs/{zh,en}/quick-start/golang-project-from-scratch.md: hands-on Go CLI
  tutorial covering go mod init and go.mod line by line, the Cobra/Viper/PTerm
  dependency stack, cmd/internal/pkg layering, a first Cobra subcommand, and a
  Taskfile walkthrough with a minimal template; includes installable SKILL
  golang-project-from-scratch
- docs/{zh,en}/quick-start/docs-site-from-scratch.md: hands-on docmd site
  tutorial covering npm init and package.json fields, installing docmd,
  docmd.config.js, navigation.json + bilingual i18n, and publishing to GitHub
  Pages via the repo's docs.yml workflow; includes installable SKILL
  docs-site-from-scratch
- register both pages in docs/{zh,en}/navigation.json
- record the work as section 9 in AGENTS.md

Co-Authored-By: Claude Code <noreply@anthropic.com>
@qdriven
qdriven merged commit 636a4d9 into main Oct 21, 2026
@qdriven
qdriven deleted the 24-from-scratch-tutorials branch October 21, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

创建一个基本标准的golang项目的教程

1 participant