Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMatch = errors.New("no match for the path")
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { Category string // The category (name) of the node, for directories and single pages, categories are empty Path string // The URL path LocalPath string // Full path with .md extension Content []byte // The content of the node Title string // The title of the document in the given language Headings goldmarktoc.Items // Headings in the node Nodes []*Node // The list of sub-nodes Previous *PageLink // The previous page Next *PageLink // The next page }
Node is a node in the documentation hierarchy.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a store maintaining documentation hierarchies for multiple languages.
func Init ¶
func Init(typ conf.DocType, target, targetDir string, languages []string, baseURLPath string) (*Store, error)
Init initializes the documentation store from given type and target.
func (*Store) FirstDocPath ¶
FirstDocPath returns the URL path of the first doc that has content in the default language.
func (*Store) Match ¶
Match matches a node with given path in given language. If the no such node exists or the node content is empty, it fallbacks to use the node with same path in default language.
Click to show internal directories.
Click to hide internal directories.