markdown

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package markdown is docs/1 over the repository's own Markdown: docs/, ADRs and READMEs, searched, read, written and listed as a tree. A page's id is its path from the project directory.

Index

Constants

This section is empty.

Variables

View Source
var DefaultDirs = []string{"docs", "doc", "adr", "docs/adr", "README.md", "CONTRIBUTING.md"}

DefaultDirs are read when plugins.markdown-docs.dirs is not set; missing ones are skipped.

Functions

func Register

func Register(p *sdk.Plugin)

Types

type Page

type Page struct {
	ID      string    `json:"id"`
	Title   string    `json:"title"`
	Path    string    `json:"path"`
	Updated time.Time `json:"updated"`
	URL     string    `json:"url"`
	Depth   int       `json:"depth"`
	// contains filtered or unexported fields
}

func Pages

func Pages(root string, dirs []string) []Page

Pages walks dirs under root for .md files, each titled by its first # heading.

func Search(pages []Page, query string) []Page

Search ranks pages whose title holds every word first, then those whose text does.

Jump to

Keyboard shortcuts

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