mdxgen

package
v0.0.0-...-5d10380 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderIndexMDX

func RenderIndexMDX(ctx context.Context, pd PackageData) (string, error)

RenderIndexMDX renders a single package page.

Types

type Options

type Options struct {
	// IgnoreFile is an optional path to an extra ignore file, relative to srcDir
	// unless absolute. It is applied after .gitignore/.mdxignore.
	// Missing files are ignored silently.
	IgnoreFile string
}

Options controls generation behavior.

type PackageData

type PackageData struct {
	Path        string
	Name        string
	ModulePath  string
	Version     string
	Synopsis    string
	Description string
	Readme      string
	DocSource   []byte
}

PackageData contains the minimum data needed to render a package page.

type Summary

type Summary struct {
	Generated int
	Skipped   int
	Failed    int
}

Summary reports generator results.

func Generate

func Generate(ctx context.Context, srcDir, outDir string) (Summary, error)

Generate creates MDX content for local packages under srcDir into outDir.

func GenerateWithOptions

func GenerateWithOptions(ctx context.Context, srcDir, outDir string, opts Options) (Summary, error)

GenerateWithOptions creates MDX content with custom options.

Jump to

Keyboard shortcuts

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