blog

package
v0.0.0-...-3a06d03 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBlogPostPath = "dist/articles"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenGraphImage

type OpenGraphImage struct {
	URL      string
	Width    int
	Height   int
	Size     int
	MimeType string
}

func (OpenGraphImage) Complete

func (img OpenGraphImage) Complete() bool

type Post

type Post struct {
	ID             string
	Title          string
	PublishDate    time.Time
	Tags           []string
	HashCode       string
	OpenGraphImage OpenGraphImage

	HTML template.HTML
	// contains filtered or unexported fields
}

func ReadPost

func ReadPost(ctx context.Context, path string, blogPostID string) (*Post, error)

func ReadPosts

func ReadPosts(ctx context.Context, path string) ([]*Post, error)

func (*Post) Year

func (p *Post) Year() int

Jump to

Keyboard shortcuts

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