Skip to content

fix: use Mintlify MDX components in helm chart docs templates#871

Merged
dangrondahl merged 1 commit into
mainfrom
fix-helm-chart
May 8, 2026
Merged

fix: use Mintlify MDX components in helm chart docs templates#871
dangrondahl merged 1 commit into
mainfrom
fix-helm-chart

Conversation

@dangrondahl
Copy link
Copy Markdown
Contributor

@dangrondahl dangrondahl commented May 8, 2026

Summary

  • Add mintlify.install and mintlify.customCA template overrides in _mintlify_templates.gotmpl so the Mintlify output uses <Steps>, <Note>, <Info>, <Warning> components while the plain markdown README stays unchanged
  • Auto sentence-case <ParamField> descriptions (capitalize first word, ensure trailing period)
  • Escape angle brackets in values.yaml descriptions (<instance_name>INSTANCE_NAME) to prevent JSX parse errors in MDX

Closes #853

Test plan

  • Run cd charts/k8s-reporter && helm-docs --template-files README.md.gotmpl,_templates.gotmpl and verify README.md has no Mintlify components
  • Run cd charts/k8s-reporter && helm-docs --template-files MINTLIFY.md.gotmpl,_templates.gotmpl,_mintlify_templates.gotmpl and copy output to docs repo as helm/k8s_reporter.mdx
  • Verify the MDX page renders in Mintlify without JSX parse errors

Add mintlify.install and mintlify.customCA template overrides so the
Mintlify output uses <Steps>, <Note>, <Info>, <Warning> and <ParamField>
components while the plain markdown README stays unchanged.

- Replace numbered lists with <Steps>/<Step> in install and customCA sections
- Replace blockquotes with <Note>, <Info>, <Warning> callouts
- Remove backticks from section headings (customCA, extraVolumes, etc.)
- Auto sentence-case ParamField descriptions (capitalize first word, add period)
- Escape angle brackets in values.yaml descriptions to avoid JSX parse errors
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 8, 2026

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


PR Review: fix: use Mintlify MDX components in helm chart docs templates

  • Run static analysis (build, vet, mod tidy)
  • Review changed files
  • Post inline comments on specific issues
  • Post summary review

Static Analysis

All checks pass: go build ./..., go vet ./..., go mod tidy — no issues.

Summary

Clean, well-structured PR. The approach of creating dedicated mintlify.install and mintlify.customCA templates that mirror the plain-markdown counterparts but wrap content in MDX components (<Steps>, <Note>, <Info>, <Warning>) is the pragmatic solution given Go template limitations.

What works well:

  • The values.yaml angle-bracket escaping (<instance_name>INSTANCE_NAME) prevents JSX parse errors at the source, and the backtick-wrapping of {name, value} etc. improves readability in both README and MDX outputs
  • The sentence-casing logic in mintlify.paramField (capitalize first char, ensure trailing period) is correctly guarded against empty descriptions and handles edge cases like backtick-prefixed or acronym-prefixed text
  • The template split is clean — MINTLIFY.md.gotmpl picks mintlify.* templates while README.md.gotmpl stays on extra.*, keeping the two output paths independent

One observation (not a blocker):

  • The mintlify.install / mintlify.customCA templates duplicate nearly all the prose from extra.install / extra.customCA — only the markup differs. Future content changes will need updates in both places. Left an inline comment suggesting a brief note at the top of the file for future maintainers.

No bugs, security issues, or correctness concerns found. LGTM.

Comment thread charts/k8s-reporter/_mintlify_templates.gotmpl
Comment thread charts/k8s-reporter/_mintlify_templates.gotmpl
@dangrondahl dangrondahl enabled auto-merge (squash) May 8, 2026 14:18
@dangrondahl dangrondahl merged commit c2eb5d1 into main May 8, 2026
20 checks passed
@dangrondahl dangrondahl deleted the fix-helm-chart branch May 8, 2026 14:19
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.

fix: Helm chart README template produces Mintlify-incompatible markdown

2 participants