Documentation
¶
Index ¶
- Variables
- func NewAdmonitionExtension() goldmark.Extender
- func NewAdmonitionHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
- func NewAdmonitionParser() parser.BlockParser
- func TransformExternalLinks(doc ast.Node)
- func TransformMarkdownLinks(doc ast.Node, currentPagePath string, basePath string)
- type Admonition
- type AdmonitionExtension
- type ChangelogParser
- func (p *ChangelogParser) ParseChangelogDir(changelogDir string) (*core.ChangelogPage, error)
- func (p *ChangelogParser) ParseConfig(path string) (core.ChangelogConfig, error)
- func (p *ChangelogParser) ParseRelease(path string) (core.Release, error)
- func (p *ChangelogParser) ParseReleases(dir string) ([]core.Release, error)
- type FrontmatterParser
- type IncidentFrontmatter
- type MCPParser
- type MaintenanceFrontmatter
- type MarkdownParser
- type OpenAPIParser
- type ReleaseFrontmatter
- type StatusParser
- func (p *StatusParser) ParseComponents(path string) ([]core.StatusComponent, error)
- func (p *StatusParser) ParseConfig(path string) (core.StatusConfig, error)
- func (p *StatusParser) ParseIncident(path string) (core.Incident, error)
- func (p *StatusParser) ParseIncidents(dir string) ([]core.Incident, error)
- func (p *StatusParser) ParseMaintenance(dir string) ([]core.Maintenance, error)
- func (p *StatusParser) ParseMaintenanceFile(path string) (core.Maintenance, error)
- func (p *StatusParser) ParseStatusDir(statusDir string) (*core.StatusPage, error)
- type TOCEntry
- type TOCFileParser
- type TOCParser
Constants ¶
This section is empty.
Variables ¶
var AdmonitionKind = ast.NewNodeKind("Admonition")
AdmonitionKind represents the type of admonition
Functions ¶
func NewAdmonitionExtension ¶
NewAdmonitionExtension returns a new AdmonitionExtension
func NewAdmonitionHTMLRenderer ¶
func NewAdmonitionHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
NewAdmonitionHTMLRenderer returns a new admonition HTML renderer
func NewAdmonitionParser ¶
func NewAdmonitionParser() parser.BlockParser
NewAdmonitionParser returns a new admonition parser
func TransformExternalLinks ¶
TransformExternalLinks adds target="_blank" and rel="noopener noreferrer" to external links
func TransformMarkdownLinks ¶
TransformMarkdownLinks walks the AST and converts relative .md links to .html It applies slug transformation logic to match the navigation URL structure basePath is prepended to all transformed links (e.g., "/docs")
Types ¶
type Admonition ¶
Admonition is a custom block node for admonitions (:::info, :::warning, etc.)
func (*Admonition) Dump ¶
func (n *Admonition) Dump(source []byte, level int)
Dump implements ast.Node.Dump
type AdmonitionExtension ¶
type AdmonitionExtension struct{}
AdmonitionExtension is a Goldmark extension for admonitions
func (*AdmonitionExtension) Extend ¶
func (e *AdmonitionExtension) Extend(m goldmark.Markdown)
Extend implements goldmark.Extender
type ChangelogParser ¶
type ChangelogParser struct {
// contains filtered or unexported fields
}
ChangelogParser handles parsing of changelog content
func NewChangelogParser ¶
func NewChangelogParser() *ChangelogParser
NewChangelogParser creates a new changelog parser
func (*ChangelogParser) ParseChangelogDir ¶
func (p *ChangelogParser) ParseChangelogDir(changelogDir string) (*core.ChangelogPage, error)
ParseChangelogDir parses all changelog content from a directory
func (*ChangelogParser) ParseConfig ¶
func (p *ChangelogParser) ParseConfig(path string) (core.ChangelogConfig, error)
ParseConfig parses the changelog config.yaml file
func (*ChangelogParser) ParseRelease ¶
func (p *ChangelogParser) ParseRelease(path string) (core.Release, error)
ParseRelease parses a single release markdown file
func (*ChangelogParser) ParseReleases ¶
func (p *ChangelogParser) ParseReleases(dir string) ([]core.Release, error)
ParseReleases parses all release markdown files in a directory
type FrontmatterParser ¶
type FrontmatterParser struct{}
FrontmatterParser handles extraction of YAML frontmatter from markdown
func NewFrontmatterParser ¶
func NewFrontmatterParser() *FrontmatterParser
NewFrontmatterParser creates a new frontmatter parser
type IncidentFrontmatter ¶
type IncidentFrontmatter struct {
ID string `yaml:"id"`
Title string `yaml:"title"`
Status core.IncidentStatus `yaml:"status"`
Severity core.IncidentSeverity `yaml:"severity"`
AffectedComponents []string `yaml:"affected_components"`
CreatedAt time.Time `yaml:"created_at"`
UpdatedAt time.Time `yaml:"updated_at"`
ResolvedAt *time.Time `yaml:"resolved_at"`
}
IncidentFrontmatter represents the YAML frontmatter for incidents
type MCPParser ¶ added in v1.5.0
type MCPParser struct{}
MCPParser handles parsing of MCP server manifest files
func NewMCPParser ¶ added in v1.5.0
func NewMCPParser() *MCPParser
NewMCPParser creates a new MCP parser
type MaintenanceFrontmatter ¶
type MaintenanceFrontmatter struct {
ID string `yaml:"id"`
Title string `yaml:"title"`
Description string `yaml:"description"`
AffectedComponents []string `yaml:"affected_components"`
ScheduledStart time.Time `yaml:"scheduled_start"`
ScheduledEnd time.Time `yaml:"scheduled_end"`
Status core.MaintenanceStatus `yaml:"status"`
}
MaintenanceFrontmatter represents the YAML frontmatter for maintenance
type MarkdownParser ¶
type MarkdownParser struct {
// contains filtered or unexported fields
}
MarkdownParser handles markdown to HTML conversion
func NewMarkdownParser ¶
func NewMarkdownParser() *MarkdownParser
NewMarkdownParser creates a new markdown parser with recommended extensions
func (*MarkdownParser) Parse ¶
func (p *MarkdownParser) Parse(content []byte) ([]byte, error)
Parse converts markdown content to HTML
func (*MarkdownParser) ParseWithContext ¶
func (p *MarkdownParser) ParseWithContext(content []byte, currentPagePath string, basePath string) ([]byte, error)
ParseWithContext converts markdown content to HTML with link transformation currentPagePath is the relative path from docs root (e.g., "api/getting-started.md") basePath is the base path to prepend to all links (e.g., "/docs")
type OpenAPIParser ¶
type OpenAPIParser struct {
// contains filtered or unexported fields
}
OpenAPIParser handles parsing of OpenAPI specifications
func NewOpenAPIParser ¶
func NewOpenAPIParser(cacheDir string) *OpenAPIParser
NewOpenAPIParser creates a new OpenAPI parser
func (*OpenAPIParser) NameFromURL ¶
func (p *OpenAPIParser) NameFromURL(url string) string
NameFromURL extracts a filename from a URL
type ReleaseFrontmatter ¶
type ReleaseFrontmatter struct {
Version string `yaml:"version"`
Date time.Time `yaml:"date"`
Title string `yaml:"title"`
Prerelease bool `yaml:"prerelease"`
}
ReleaseFrontmatter represents the YAML frontmatter for releases
type StatusParser ¶
type StatusParser struct {
// contains filtered or unexported fields
}
StatusParser handles parsing of status page content
func NewStatusParser ¶
func NewStatusParser() *StatusParser
NewStatusParser creates a new status parser
func (*StatusParser) ParseComponents ¶
func (p *StatusParser) ParseComponents(path string) ([]core.StatusComponent, error)
ParseComponents parses the components.yaml file
func (*StatusParser) ParseConfig ¶
func (p *StatusParser) ParseConfig(path string) (core.StatusConfig, error)
ParseConfig parses the status config.yaml file
func (*StatusParser) ParseIncident ¶
func (p *StatusParser) ParseIncident(path string) (core.Incident, error)
ParseIncident parses a single incident markdown file
func (*StatusParser) ParseIncidents ¶
func (p *StatusParser) ParseIncidents(dir string) ([]core.Incident, error)
ParseIncidents parses all incident markdown files in a directory
func (*StatusParser) ParseMaintenance ¶
func (p *StatusParser) ParseMaintenance(dir string) ([]core.Maintenance, error)
ParseMaintenance parses all maintenance markdown files in a directory
func (*StatusParser) ParseMaintenanceFile ¶
func (p *StatusParser) ParseMaintenanceFile(path string) (core.Maintenance, error)
ParseMaintenanceFile parses a single maintenance markdown file
func (*StatusParser) ParseStatusDir ¶
func (p *StatusParser) ParseStatusDir(statusDir string) (*core.StatusPage, error)
ParseStatusDir parses all status content from a directory
type TOCEntry ¶
type TOCEntry struct {
Title string
FilePath string
Level int
IsExternal bool
Children []*TOCEntry
}
TOCEntry represents an entry in the TOC.md file
type TOCFileParser ¶
type TOCFileParser struct {
// contains filtered or unexported fields
}
TOCFileParser parses a TOC.md file to extract navigation structure
func NewTOCFileParser ¶
func NewTOCFileParser(docsDir string) *TOCFileParser
NewTOCFileParser creates a new TOC file parser
func (*TOCFileParser) Flatten ¶
func (p *TOCFileParser) Flatten(entries []*TOCEntry) []string
Flatten returns a flat list of all file paths in order