blog

package
v0.0.0-...-2e1f908 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlogManager

type BlogManager struct {
	// contains filtered or unexported fields
}

func NewBlogManager

func NewBlogManager() BlogManager

func (*BlogManager) GetBlogPostBySlug

func (m *BlogManager) GetBlogPostBySlug(slug string) *BlogPost

The argument is the string part of the URL after /blog/someslug, which will retrieve the matching blogpost based on slug value in the markdown file.

func (*BlogManager) GetBlogPostsByTag

func (m *BlogManager) GetBlogPostsByTag(tag string) *BlogPosts

Gets all blogposts with a specific tag

func (*BlogManager) ListBlogPosts

func (m *BlogManager) ListBlogPosts() *BlogPosts

Returns an already sorted list of posts

func (*BlogManager) LoadBlogPosts

func (m *BlogManager) LoadBlogPosts() error

Read all blog markdown files from the embedded fs which includes all files in ./posts

type BlogPost

type BlogPost struct {
	Title       string
	Description string
	Date        string
	Slug        string
	Content     string
	Canonical   string
	Tags        []interface{}
}

type BlogPosts

type BlogPosts struct {
	Posts []BlogPost
}

Jump to

Keyboard shortcuts

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