commands

package
v0.0.0-...-f18dcbc Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(drafts bool) error

Build is the core builder function. Converts markdown/yaml to html, copies over non-.md/.yaml files, etc.

func Init

func Init(path string) error

func New

func New(path string) error

func Serve

func Serve(addr string) error

Types

type Dir

type Dir struct {
	Name     string
	HasIndex bool
	Files    []types.File
}

type Pages

type Pages struct {
	Dirs  []Dir
	Files []types.File

	// A map of directories to their respective posts.
	AllPosts map[string][]types.Post
}

func NewPages

func NewPages() (*Pages, error)

func (*Pages) ProcessDirectories

func (p *Pages) ProcessDirectories(drafts bool) error

ProcessDirectories handles directories of posts under 'pages', for example: 'pages/photos/foo.md' or 'pages/blog/bar.md'.

func (*Pages) ProcessFiles

func (p *Pages) ProcessFiles(drafts bool) error

ProcessFiles handles root level files under 'pages', for example: 'pages/_index.md' or 'pages/about.md'.

Jump to

Keyboard shortcuts

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