slug

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodeSlug

func NodeSlug(id, subject, topic string) string

NodeSlug returns the human/LLM-friendly slug used in wiki cross-references.

func ParseMemoryLinks(body string) []string

ParseMemoryLinks extracts referenced slugs from a memory body. It supports [slug] and markdown links. HTTP(S) links are ignored.

func RenderWikiLinks(body string, resolve func(label, normalizedSlug string) (href string, ok bool)) string

RenderWikiLinks converts [[label]] links using resolve. Returning ok=false keeps the original wiki link.

func RestoreMarkdownFileLinks(body string) string

RestoreMarkdownFileLinks converts relative markdown links to .md files back into [slug] links so repeated syncs remain stable.

func Slugify

func Slugify(s string) string

Slugify normalizes a user/LLM-facing memory label for [slug] links.

Types

This section is empty.

Jump to

Keyboard shortcuts

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