builder

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Overview

Logic for generating opengraph image

Index

Constants

This section is empty.

Variables

View Source
var (
	EmbeddedFiles embed.FS
)

Functions

func Build

func Build(config config.Config) error

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
	SourceFile  string
}

func RenderAllMDToHTML

func RenderAllMDToHTML(mds []MarkdownData) []MarkdownData

type Matter

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

type Meta added in v1.5.0

type Meta struct {
	Title       string
	Description string
	ImageURL    string
	URL         string
	Type        string
}

type SiteData

type SiteData struct {
	Title       string
	Author      string
	Description string
	URL         string
	Pages       []MarkdownData
	GenerateRSS bool
	Socials     config.Socials
	EditBaseURL string
	HeadLinks   []config.HeadLink
}

type YAMLDate

type YAMLDate time.Time

func (YAMLDate) Format

func (yd YAMLDate) Format(layout string) string

func (YAMLDate) MarshalYAML

func (d YAMLDate) MarshalYAML() (any, error)

func (*YAMLDate) UnmarshalYAML

func (d *YAMLDate) UnmarshalYAML(unmarshal func(any) error) error

Jump to

Keyboard shortcuts

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