Skip to content

chore: extract template for documentation to a dedicated file#5677

Open
remyleone wants to merge 4 commits into
mainfrom
extract_template
Open

chore: extract template for documentation to a dedicated file#5677
remyleone wants to merge 4 commits into
mainfrom
extract_template

Conversation

@remyleone

Copy link
Copy Markdown
Member

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Release note for CHANGELOG:


Copilot AI review requested due to automatic review settings June 10, 2026 17:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the documentation generator to embed its markdown template from a dedicated .tmpl file, and regenerates the command docs accordingly (mostly whitespace/formatting normalization).

Changes:

  • Extract the markdown template into internal/docgen/main.md.tmpl and embed it via //go:embed.
  • Update internal/docgen/docgen.go to parse the embedded template instead of an inline Go string.
  • Regenerate docs/commands/*.md to reflect the template’s updated whitespace output.

Reviewed changes

Copilot reviewed 2 out of 58 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/docgen/main.md.tmpl Moves the namespace markdown template content into a standalone template file for embedding.
internal/docgen/docgen.go Switches from an inline template string to go:embed + parsing the embedded template; adjusts related types.
docs/commands/account.md Regenerated output; whitespace normalization from updated template.
docs/commands/alias.md Regenerated output; whitespace normalization from updated template.
docs/commands/apple-silicon.md Regenerated output; whitespace normalization from updated template.
docs/commands/audit-trail.md Regenerated output; whitespace normalization from updated template.
docs/commands/autocomplete.md Regenerated output; whitespace normalization from updated template.
docs/commands/baremetal.md Regenerated output; whitespace normalization from updated template.
docs/commands/billing.md Regenerated output; whitespace normalization from updated template.
docs/commands/block.md Regenerated output; whitespace normalization from updated template.
docs/commands/cockpit.md Regenerated output; whitespace normalization from updated template.
docs/commands/config.md Regenerated output; whitespace normalization from updated template.
docs/commands/container.md Regenerated output; whitespace normalization from updated template.
docs/commands/datalab.md Regenerated output; whitespace normalization from updated template.
docs/commands/datawarehouse.md Regenerated output; whitespace normalization from updated template.
docs/commands/dns.md Regenerated output; whitespace normalization from updated template.
docs/commands/domain.md Regenerated output; whitespace normalization from updated template.
docs/commands/edge-services.md Regenerated output; whitespace normalization from updated template.
docs/commands/environmental-footprint.md Regenerated output; whitespace normalization from updated template.
docs/commands/feedback.md Regenerated output; whitespace normalization from updated template.
docs/commands/file.md Regenerated output; whitespace normalization from updated template.
docs/commands/fip.md Regenerated output; whitespace normalization from updated template.
docs/commands/function.md Regenerated output; whitespace normalization from updated template.
docs/commands/help.md Regenerated output; whitespace normalization from updated template.
docs/commands/iam.md Regenerated output; whitespace normalization from updated template.
docs/commands/inference.md Regenerated output; whitespace normalization from updated template.
docs/commands/info.md Regenerated output; whitespace normalization from updated template.
docs/commands/init.md Regenerated output; whitespace normalization from updated template.
docs/commands/instance.md Regenerated output; whitespace normalization from updated template.
docs/commands/interlink.md Regenerated output; whitespace normalization from updated template.
docs/commands/iot.md Regenerated output; whitespace normalization from updated template.
docs/commands/ipam.md Regenerated output; whitespace normalization from updated template.
docs/commands/jobs.md Regenerated output; whitespace normalization from updated template.
docs/commands/k8s.md Regenerated output; whitespace normalization from updated template.
docs/commands/keymanager.md Regenerated output; whitespace normalization from updated template.
docs/commands/lb.md Regenerated output; whitespace normalization from updated template.
docs/commands/login.md Regenerated output; whitespace normalization from updated template.
docs/commands/marketplace.md Regenerated output; whitespace normalization from updated template.
docs/commands/mcp.md Regenerated output; whitespace normalization from updated template.
docs/commands/mnq.md Regenerated output; whitespace normalization from updated template.
docs/commands/mongodb.md Regenerated output; whitespace normalization from updated template.
docs/commands/object.md Regenerated output; whitespace normalization from updated template.
docs/commands/partner.md Regenerated output; whitespace normalization from updated template.
docs/commands/product-catalog.md Regenerated output; whitespace normalization from updated template.
docs/commands/rdb.md Regenerated output; whitespace normalization from updated template.
docs/commands/redis.md Regenerated output; whitespace normalization from updated template.
docs/commands/registry.md Regenerated output; whitespace normalization from updated template.
docs/commands/s2s-vpn.md Regenerated output; whitespace normalization from updated template.
docs/commands/sdb-sql.md Regenerated output; whitespace normalization from updated template.
docs/commands/search.md Regenerated output; whitespace normalization from updated template.
docs/commands/searchdb.md Regenerated output; whitespace normalization from updated template.
docs/commands/secret.md Regenerated output; whitespace normalization from updated template.
docs/commands/shell.md Regenerated output; whitespace normalization from updated template.
docs/commands/tem.md Regenerated output; whitespace normalization from updated template.
docs/commands/version.md Regenerated output; whitespace normalization from updated template.
docs/commands/vpc-gw.md Regenerated output; whitespace normalization from updated template.
docs/commands/vpc.md Regenerated output; whitespace normalization from updated template.
docs/commands/webhosting.md Regenerated output; whitespace normalization from updated template.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/docgen/docgen.go
Comment on lines +15 to +18
import _ "embed"

//go:embed main.md.tmpl
var mainTemplate string
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.68%. Comparing base (d915a51) to head (9e8734e).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/docgen/docgen.go 0.00% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5677   +/-   ##
=======================================
  Coverage   50.68%   50.68%           
=======================================
  Files         340      340           
  Lines       78086    78086           
=======================================
  Hits        39577    39577           
  Misses      37013    37013           
  Partials     1496     1496           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants