Skip to content

docs: add spec-first documentation site - #69

Merged
fredbi merged 2 commits into
go-swagger:masterfrom
fredbi:doc/new-doc-site
Jul 22, 2026
Merged

docs: add spec-first documentation site#69
fredbi merged 2 commits into
go-swagger:masterfrom
fredbi:doc/new-doc-site

Conversation

@fredbi

@fredbi fredbi commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Introduce a Hugo + Relearn documentation site for go-swagger/examples, positioned as the spec-first corner of the three sibling doc sites (this repo = spec-first codegen; go-openapi/runtime = untyped/hand-wired; go-openapi/codescan = code-first).

  • docs/doc-site/: full content catalog — guides (servers, clients & CLI, authentication, streaming, customizing codegen), tutorials (todo-list, client SDK, custom server), and project pages (README, license, contributing, regeneration).
  • hack/doc-site/hugo/: Hugo config, custom code shortcode, layouts, branding themes, and gendoc.go local-preview helper. Downloaded Relearn theme and generated examples.yaml are git-ignored.
  • .github/workflows/update-doc.yml: build + deploy to GitHub Pages, mirroring go-openapi/runtime's update-doc workflow.
  • Region markers (snippet:/endsnippet:) added to hand-written specs and glue across the examples, so guide/tutorial pages embed real, committed, regenerated source via the code shortcode.

fredbi and others added 2 commits July 22, 2026 11:39
Introduce a Hugo + Relearn documentation site for go-swagger/examples,
positioned as the spec-first corner of the three sibling doc sites
(this repo = spec-first codegen; go-openapi/runtime = untyped/hand-wired;
go-openapi/codescan = code-first).

- docs/doc-site/: full content catalog — guides (servers, clients & CLI,
  authentication, streaming, customizing codegen), tutorials (todo-list,
  client SDK, custom server), and project pages (README, license,
  contributing, regeneration).
- hack/doc-site/hugo/: Hugo config, custom `code` shortcode, layouts,
  branding themes, and gendoc.go local-preview helper. Downloaded
  Relearn theme and generated examples.yaml are git-ignored.
- .github/workflows/update-doc.yml: build + deploy to GitHub Pages,
  mirroring go-openapi/runtime's update-doc workflow.
- Region markers (snippet:/endsnippet:) added to hand-written specs and
  glue across the examples, so guide/tutorial pages embed real, committed,
  regenerated source via the code shortcode.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
The `code` shortcode embeds real example sources via the assets/examples
mount, whose source is the repo root (../../..). Those sources live in
top-level example dirs (cli/, task-tracker/, todo-list-errors/, …), not
under docs/. The sparse-checkout of hack/+docs/ left them absent in CI,
so every `code` shortcode failed to resolve its mounted asset even though
the build works locally (where the whole repo is present). Drop the
sparse-checkout and check out the full tree.

Also replace the `args: >` fold scalar on the Hugo action with a single
line: per our workflow conventions, fold scalars in `with:` inputs can
reach the runner with embedded newlines and break flag parsing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@fredbi
fredbi merged commit 9bf5e39 into go-swagger:master Jul 22, 2026
18 checks passed
@fredbi
fredbi deleted the doc/new-doc-site branch July 22, 2026 11:15
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.

1 participant