Documentation
¶
Overview ¶
Package mdbook is a helper for writing mdbook plugins.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Book ¶
type Book struct {
Items []Item `json:"items"`
X *struct{} `json:"__non_exhaustive"`
}
Book is an mdbook book.
type BookConfig ¶
type BookConfig struct {
Authors []string `json:"authors"`
Source string `json:"src"`
Description string `json:"description"`
Language string `json:"language"`
Title string `json:"title"`
MultiLingual bool `json:"multilingual"`
}
BookConfig is the mdbook metadata and configuration.
type Chapter ¶
type Chapter struct {
Name string `json:"name"`
Content string `json:"content"`
Number []int `json:"number"`
SubItems []Item `json:"sub_items"`
Path *string `json:"path"`
SourcePath *string `json:"source_path"`
ParentNames []string `json:"parent_names"`
}
Chapter is an mdbook chapter.
type Context ¶
type Context struct {
Root string `json:"root"`
Renderer string `json:"renderer"`
Version string `json:"mdbook_version"`
Config struct {
Book BookConfig `json:"book"`
Output map[string]json.RawMessage `json:"output"`
} `json:"config"`
Preprocessor map[string]json.RawMessage `json:"preprocessor"`
}
Context is the whole mdbook context.
type Item ¶ added in v1.5.46
type Proc ¶
type Proc struct {
// contains filtered or unexported fields
}
Proc is a helper for modifying a Book.
func NewProc ¶ added in v1.5.53
NewProc returns a Proc with the provided [RegisterFunc]s called on it.
type RegisterFunc ¶ added in v1.5.53
RegisterFunc is the type for arranging to have a preprocessor's hooks called.
Implmentations should use the passed context.Context and Context, then call functions to register hooks in the Proc as needed.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package godoc is an mdbook preprocessor to inline `go doc` output.
|
Package godoc is an mdbook preprocessor to inline `go doc` output. |
|
Package injecturls is an mdbook preprocessor meant to collect urls via a comment directive.
|
Package injecturls is an mdbook preprocessor meant to collect urls via a comment directive. |
|
Package maketarget is an mdbook preprocessor to check that documented Makefile targets exist.
|
Package maketarget is an mdbook preprocessor to check that documented Makefile targets exist. |
|
Package mermaid is an mdbook preprocessor meant to slip-stream mermaid diagrams.
|
Package mermaid is an mdbook preprocessor meant to slip-stream mermaid diagrams. |
Click to show internal directories.
Click to hide internal directories.