titleresolver

package
v0.59.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveTitle

func ResolveTitle(manifestFM, docFM map[string]interface{}, nodeName string, indexFileNames []string, parentName string, isRootIndex bool) string

ResolveTitle determines the display title for a node using a three-level priority chain:

  1. manifest frontmatter "title" (non-empty string) — highest priority, explicit override
  2. document frontmatter "title" (non-empty string) — from the source .md file
  3. filename derivation — index/README nodes use parentName (or "Root" for root index); all others use nodeName. Applied: TrimSuffix ".md", replace "_"/"-" → " ", Title case.

Pure function: no mutations, no I/O.

Types

This section is empty.

Jump to

Keyboard shortcuts

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