Documentation
¶
Overview ¶
Package wiki contains the shared Markdown/wiki parsing and normalization rules that define canonical Knowl workspace semantics.
Index ¶
- func IndexTargets(content string) ([]string, bool)
- func Links(from knowl.PageID, content string) []knowl.LinkReference
- func MarkdownTargets(content string) ([]string, bool)
- func NormalizePageTarget(target string) string
- func PageIDFromPath(path string) (knowl.PageID, bool)
- func SourceRefs(content string) []string
- type Frontmatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexTargets ¶
IndexTargets extracts both wiki links and bare list-item targets from index content.
func Links ¶
func Links(from knowl.PageID, content string) []knowl.LinkReference
Links converts normalized page targets into unique wiki link references.
func MarkdownTargets ¶
MarkdownTargets extracts normalized wiki-link targets from Markdown.
func NormalizePageTarget ¶
NormalizePageTarget converts a wiki reference into a canonical page ID.
func PageIDFromPath ¶
PageIDFromPath derives the canonical page ID from a wiki Markdown path.
func SourceRefs ¶
SourceRefs returns a deterministic, deduplicated source-ref list.
Types ¶
type Frontmatter ¶
type Frontmatter struct {
ID string `yaml:"id"`
Title string `yaml:"title"`
Type string `yaml:"type"`
SourceRefs []string `yaml:"source_refs"`
}
Frontmatter is the bounded YAML metadata recognized on ordinary pages.
func ParseFrontmatter ¶
func ParseFrontmatter(content string) (Frontmatter, error)
ParseFrontmatter reads and trims the leading YAML frontmatter block.