gentoc

package
v0.58.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(nav *Nav) ([]byte, error)

Marshal serialises nav to YAML bytes.

Types

type Nav struct {
	Nav []*NavEntry `yaml:"nav"`
}

Nav is the top-level navigation document.

func FromNodes

func FromNodes(nodes []*manifest.Node, stripRoot bool) *Nav

FromNodes builds a Nav from the resolved manifest node tree. nodes[0] is expected to be the root node produced by manifest.ResolveManifest. stripRoot removes the top-level directory prefix from all filenames.

type NavEntry struct {
	Filename string      `yaml:"filename"`
	Subnav   []*NavEntry `yaml:"subnav,omitempty"`
}

NavEntry represents one entry in the generated navigation structure.

Jump to

Keyboard shortcuts

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