shared

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTOC

func GenerateTOC(markdown string) string

GenerateTOC generates a simple markdown list, which can be used as TOC for the given markdown file.

Types

type Index

type Index struct {
	Key         string           `json:"key"`
	Name        string           `json:"name"`
	Description string           `json:"description"`
	Home        string           `json:"home"`
	TOC         []map[string]any `json:"toc"`
}

Index is the structure of the index file required in the root directory for each TechDoc.

func ParseIndex

func ParseIndex(content []byte) (Index, error)

ParseIndex parses the given content into the index structure.

type Markdown

type Markdown struct {
	Markdown string `json:"markdown"`
	TOC      string `json:"toc"`
}

Markdown is the structure for returning a markdown file.

Jump to

Keyboard shortcuts

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