Documentation ¶
Overview ¶
Package gdn provides tools for generating a static website from a source of pages written in the Gemini text and organized in directories.
Index ¶
Constants ¶
const BranchPerm os.FileMode = 0750
BranchPerm sets the permission for the directories produced when growing.
const LeafPerm os.FileMode = 0640
LeafPerm is the permission to set for the generated file the leaf produces.
Variables ¶
var ( // ErrSrcNotSet occurs when the source path is not set. ErrSrcNotSet = errors.New("source path is not set") // ErrDstNotSet occurs when the destinatio path is not set. ErrDstNotSet = errors.New("destination path is not set") // ErrNotScanned occurs when Scan was not called before Grow. ErrNotScanned = errors.New("need to scan tree before growing it") // ErrEmptyTree occurs when Scan results in an empty tree. ErrEmptyTree = errors.New("scan resulted in an empty tree") )
var KnownFileTypes = map[string]FileType{ ".md": Markdown, ".mkd": Markdown, ".markdown": Markdown, }
KnownFileTypes is a map of extensions to their FileType.
Functions ¶
Types ¶
type Branch ¶
Branch represents a directory tree used to generate the pages.
func NewTree ¶
NewTree creates the root of the tree. The input path is the path with all the source files and directories (e.g. Markdown, images, etc). The output path is the destination for the generated site. This returns a single Branch with no Leaves which an be used to Scan the input path to populate the tree.
type FileType ¶
type FileType uint
FileType represents a high level file type.
func TypeByExtension ¶
TypeByExtension will look up the type by its extension.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package gmi provides tools for reading Gemini text and converting it to HTML.
|
Package gmi provides tools for reading Gemini text and converting it to HTML. |