Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMatch = errors.New("no match for the path")
View Source
var (
ErrNoTitleFound = errors.New("no title found in markdown")
)
Functions ¶
This section is empty.
Types ¶
type Doc ¶
type Doc struct { Category string UrlPath string // the URL path LocalPath string // local path with .md extension Weight int // in md front matter, used to sort docs Title string // in md front matter, used to sort docs, render TOC and so on HideExtraTitle bool // when there is no title in the front matter, we get title in content and not add extra title Content []byte Headings toc.Items // if Title is empty, use Headings[0].Title Groups []*Doc Pages []*Doc Previous *PageLink Next *PageLink }
Doc is a node in the documentation hierarchy.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a store maintaining documentation hierarchies for multiple languages.
func (*Manager) Doc ¶
Doc returns the Doc of the given language. It returns the Doc of the default language if the given language is not found.
func (*Manager) FirstDocPath ¶
FirstDocPath returns the URL path of the first doc that has content in the default language.
Click to show internal directories.
Click to hide internal directories.