docpost

package
v0.3.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Process

func Process(ctx context.Context, srcDir, dstDir string) error

Process reads all compozy*.md files from srcDir, transforms them into Fumadocs-compatible MDX, and writes them to dstDir using a nested directory layout: `compozy` → compozy.mdx, `compozy_agent` → agent/index.mdx, `compozy_agent_list` → agent/list.mdx, and so on.

The root-level index.mdx and meta.json of dstDir are hand-maintained and never touched by Process. Subdirectory meta.json files are regenerated on each run. Stale files from prior runs are removed before writing.

func TransformMarkdown

func TransformMarkdown(raw, cmdName string) string

TransformMarkdown converts raw Cobra markdown to Fumadocs MDX format. It strips boilerplate, extracts metadata, and prepends YAML frontmatter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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