builder

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmbeddedFiles embed.FS

Functions

func Build

func Build(config config.Config)

func Initialise

func Initialise(author string, title string) error

func New

func New(cfg config.Config, title string, author string, draft bool) error

Types

type MarkdownData

type MarkdownData struct {
	Frontmatter Matter
	Content     []byte
	HTMLContent template.HTML
	Path        string
}

func RenderAllMDToHTML

func RenderAllMDToHTML(mds []MarkdownData) []MarkdownData

type Matter

type Matter struct {
	Title   string      `yaml:"title"`
	Author  string      `yaml:"author"`
	Tags    []string    `yaml:"tags"`
	Date    YAMLDate    `yaml:"date"`
	Type    contentType `yaml:"type"`
	Slug    postSlug    `yaml:"-"`
	IsDraft bool        `yaml:"draft"`
}

type SiteData

type SiteData struct {
	Title  string
	Author string
	Pages  []MarkdownData
}

type YAMLDate

type YAMLDate time.Time

func (YAMLDate) Format

func (yd YAMLDate) Format(layout string) string

func (YAMLDate) MarshalYAML

func (d YAMLDate) MarshalYAML() (interface{}, error)

func (*YAMLDate) UnmarshalYAML

func (d *YAMLDate) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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