Documentation
¶
Overview ¶
Package help is Docflow's manual: chapters written in Markdown beside this file, in English (en) and Japanese (ja), embedded in the binary and served by the web application at /help for everyone signed in. The same files read on GitHub: a link between chapters is written as jobs.md and rewritten to the page's URL when served.
Every chapter has the same name in every language, and the same section ids (an explicit {#id} on each heading), so that a link to a section works in any language, and the pages' own links to the manual (/help/nodes#printer) need no language.
Index ¶
Constants ¶
const Path = "/help"
Path is where the manual is served: /help/<lang>/<chapter>.
Variables ¶
var Chapters = []string{"index", "jobs", "topology", "nodes", "flow", "templates", "entries", "downloads", "displays", "inboxes", "roles", "api", "operate"}
Chapters in the order of the manual: the files' names, without .md, the same in every language. The first is the overview, served at /help/<lang> as well.
var Languages = []string{"en", "ja"}
Languages the manual is written in, the first the default: the directories beside this file.
Functions ¶
func IsLang ¶
IsLang tells a language the manual is written in. They are the pages' languages (popcornweb.toml's [i18n]): a page links the manual in its own language.
Types ¶
type Page ¶
type Page struct {
Lang string
Name string
Title string
HTML string
Sections []Section
// IDs are the ids of every heading of the page, for links to check
// against.
IDs []string
}
Page is a chapter rendered: its title (the heading at the top), the body as HTML, and its sections (the second-level headings) for a table of contents.
func Appended ¶
Appended is a page with Markdown added at its end: the chapters of the kinds of node a program registers (docflow.Kind.Doc), after the core's in nodes.md. The page itself is not changed.