docs

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package docs renders a Cobra command tree to byte-stable Markdown for the jira-cli documentation site. It mirrors the GitHub CLI's internal/docs generator: GenMarkdownTreeCustom walks the tree and GenMarkdownCustom renders one page per command, taking a filePrepender for site front-matter and a linkHandler for relative links between pages. Output is deterministic — no generation timestamp, stable ordering — so a CI drift gate only ever sees real changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenLLMsTxt

func GenLLMsTxt(w io.Writer) error

GenLLMsTxt writes a deterministic llms.txt: a short project summary, the conceptual page map, and a pointer to the canonical agent surface (the embedded runbook and schema), which are the source of truth for agents.

func GenMarkdownCustom

func GenMarkdownCustom(cmd *cobra.Command, w io.Writer, _, linkHandler func(string) string) error

GenMarkdownCustom renders a single command's page to w. linkHandler rewrites references to other generated pages; filePrepender is accepted for signature parity with the tree walker and is not used per-command.

func GenMarkdownTreeCustom

func GenMarkdownTreeCustom(cmd *cobra.Command, dir string, filePrepender, linkHandler func(string) string) (err error)

GenMarkdownTreeCustom walks cmd and every descendant, writing one Markdown page per command into dir. filePrepender receives the path of the file about to be written and returns content prepended to it (site front-matter); callers embedding it in output should pass it through filepath.Base so a machine-specific path can't leak into output and break determinism. linkHandler rewrites a target page basename into a site-relative link. It is the entry point used by cmd/gen-docs.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL