mkdocs

package module
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: MIT Imports: 3 Imported by: 1

README

Go MkDocs

Build Status Lint Status Go Report Card Docs License

Go MkDocs (go-mkdocs) is a package to work with MkDocs. Initial capabilities are to programmatically generate a mkdocs.yml file.

Documentation

Index

Constants

View Source
const (
	ExtensionAttrList = "attr_list"
	FilenameTOC       = "mkdocs.yml"
	ThemeReadTheDocs  = "readthedocs"
)

Variables

This section is empty.

Functions

func MarkdownExtensionsSimple

func MarkdownExtensionsSimple() []any

func QuoteString added in v0.2.1

func QuoteString(s string) string

Types

type Config

type Config struct {
	SiteName           string `json:"site_name" yaml:"site_name"`
	SiteURL            string `json:"site_url" yaml:"site_url"`
	DocsDir            string `json:"docs_dir" yaml:"docs_dir"`
	Theme              string `json:"theme" yaml:"theme"`
	MarkdownExtensions []any  `json:"markdown_extensions,omitempty" yaml:"markdown_extension,omitempty"`
	Nav                Texts  `json:"-" yaml:"-"`
}

func (*Config) WriteFileYAML

func (cfg *Config) WriteFileYAML(filename string, perm os.FileMode) error

type TOC

type TOC struct {
	Permalink []string `json:"permalink"`
}

type Text added in v0.2.0

type Text struct {
	Key      string
	Val      string
	Children Texts
}

type Texts added in v0.2.0

type Texts []Text

func (Texts) Markdown added in v0.2.0

func (t Texts) Markdown(prefix, indent string) []string

Markdown generates a slice of markdown lines. `Texts` is intended to ease the creation of nested key value pairs where they keys may be dynamic values.

Jump to

Keyboard shortcuts

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