Skip to content

chore: remove old Hugo docs generation#856

Merged
dangrondahl merged 7 commits into
mainfrom
42-clean-up-old-docs-generation-in-cli-repo
May 4, 2026
Merged

chore: remove old Hugo docs generation#856
dangrondahl merged 7 commits into
mainfrom
42-clean-up-old-docs-generation-in-cli-repo

Conversation

@dangrondahl
Copy link
Copy Markdown
Contributor

@dangrondahl dangrondahl commented May 4, 2026

Summary

  • Remove the docs.kosli.com/ Hugo site directory (239 tracked files)
  • Remove old doc publishing workflows (publish_docs.yml, publish_branch_docs.yml)
  • Remove docs-gen job from release.yml (the docs-repo-dispatch job is kept — Mintlify still uses it)
  • Remove Makefile targets (cli-docs, legacy-ref-docs, hugo, hugo-local, test_docs, check-links, generate-json-metadata) and associated scripts
  • Remove Hugo formatter (internal/docgen/hugo.go), make Mintlify the default and only doc format
  • Clean up references in .gitignore, .clear-files, .htmltest.yml, README, dev-guide, and release-guide
  • Remove Hugo helm-docs output line from helm-chart.yml (chart README output is kept)

Documentation is now fully maintained in kosli-dev/docs via Mintlify.

Closes kosli-dev/docs#42

Test plan

  • go build ./cmd/kosli/ succeeds
  • go test ./internal/docgen/... passes
  • CI passes (lint, integration tests)

These workflows pushed the docs.kosli.com/ directory to docs-main and
staging-docs branches for Netlify Hugo builds. No longer needed now that
docs are generated via Mintlify in kosli-dev/docs.

Part of kosli-dev/docs#42
… output

- Remove the docs-gen job that generated CLI reference markdown and
  pushed docs.kosli.com/ to the docs-main branch on every release
- Remove the docs-gen dependency from the failure-notification job
- Remove the helm-docs line that wrote to docs.kosli.com/content/helm/

The docs-repo-dispatch job is kept — it notifies kosli-dev/docs of new
CLI releases so Mintlify can regenerate.

Part of kosli-dev/docs#42
Remove targets: cli-docs, legacy-ref-docs, generate-json-metadata,
hugo, hugo-local, test_docs, check-links, and the second helm-docs
output line that wrote to docs.kosli.com/.

Delete scripts:
- bin/test_docs_cmds.sh (tested commands embedded in Hugo markdown)
- hack/generate-old-versions-docs.sh (generated legacy version docs)

Part of kosli-dev/docs#42
Remove the entire Hugo documentation site (239 tracked files): config,
layouts, content, assets, static files, and Netlify config. Documentation
is now maintained in the kosli-dev/docs Mintlify repo.

Part of kosli-dev/docs#42
- Delete internal/docgen/hugo.go and hugo_test.go
- Remove --mintlify flag from `kosli docs` (Mintlify is now the only format)
- Update generate_test.go and formatter_test.go to use MintlifyFormatter
- Update docs_test.go to compare against Mintlify golden files
- Delete Hugo golden test fixtures (testdata/output/docs/hugo/)

Part of kosli-dev/docs#42
- Remove docs.kosli.com/ patterns from .gitignore
- Delete .clear-files (preserved Hugo-generated content during deploys)
- Delete .htmltest.yml (pointed at Hugo build output)
- Update README.md and dev-guide.md docs links
- Update release-guide.md: remove old docs generation/hosting sections,
  document Mintlify dispatch workflow

Closes kosli-dev/docs#42
@dangrondahl dangrondahl force-pushed the 42-clean-up-old-docs-generation-in-cli-repo branch from 1b58e47 to e44fa90 Compare May 4, 2026 12:28
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 4, 2026

Claude finished @dangrondahl's task in 2m 22s —— View job


PR Review: Remove old Hugo docs generation

  • Run static analysis (build, vet, mod tidy)
  • Review modified files for correctness
  • Review deleted files for completeness
  • Check for leftover Hugo references
  • Post review summary

Static Analysis

All three checks pass cleanly:

  • go build ./... — compiles successfully
  • go vet ./... — no issues
  • go mod tidy — no module drift

Review

This is a clean, well-structured removal. The PR systematically eliminates the Hugo docs pipeline across all layers — workflows, Makefile, Go code, test data, and documentation — without leaving dangling references. A few observations:

Things done well

  1. Thorough cleanup — The slice-by-slice approach tracked in TODO.md ensured nothing was missed. All six slices are complete: workflows, release job, Makefile + scripts, site directory, Hugo formatter code, and cross-cutting references.

  2. Tests updated correctlygenerate_test.go assertions were updated from Hugo-specific checks ("# root child", "hint danger") to Mintlify equivalents (title: "root child", <Warning>). The compile-time interface check for HugoFormatter was removed. The docs_test.go correctly consolidated the Hugo and Mintlify test methods into single tests.

  3. Release workflow dependency chaindocs-gen was cleanly removed from both the job definition and the needs list of the Slack notification job. The docs-repo-dispatch job (which Mintlify uses) is correctly preserved.

  4. No leftover Hugo references in code — Searched for HugoFormatter, hugo, docs-gen, docs-main, .clear-files, and .htmltest across the codebase. The only remaining "Hugo" mentions are in internal/docgen/mintlify_test.go where they serve as negative assertions ("should NOT contain Hugo shortcode"), which is appropriate.

  5. docs.kosli.com URL references are correct — Remaining references like https://docs.kosli.com/faq/... in flag descriptions point to the live documentation site, not the deleted Hugo directory. These are unaffected by this change.

Minor observations (non-blocking)

The --mintlify flag removal in docs.go and the simplification to always use MintlifyFormatter{} is the right call. The docsLongDesc still says "documentation in the following formats: Markdown" which is accurate — Mintlify output is still Markdown, so no issue there.

Summary

Clean PR — no issues found. The Hugo docs infrastructure is fully removed, the Mintlify path is the sole remaining doc format, and the release pipeline dependencies are consistent. LGTM.

@dangrondahl dangrondahl disabled auto-merge May 4, 2026 16:37
@dangrondahl dangrondahl merged commit 4a9eb54 into main May 4, 2026
20 checks passed
@dangrondahl dangrondahl deleted the 42-clean-up-old-docs-generation-in-cli-repo branch May 4, 2026 16:37
dangrondahl added a commit to kosli-dev/docs that referenced this pull request May 4, 2026
## Summary
- Removes the `--mintlify` flag from `kosli docs` in the reference docs
workflow, since Mintlify becomes the default (and only) format after
kosli-dev/cli#856.

Closes #203

## Blocked on
- kosli-dev/cli#856

## Test plan
- [ ] Merge kosli-dev/cli#856
- [ ] Trigger the `Update Reference Docs` workflow and verify CLI docs
generate correctly without the flag.
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.

clean up old docs generation in CLI repo

2 participants