blog

package
v0.0.0-...-f9b4ebf Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ContentStyle = ``
View Source
const Head = `` /* 4338-byte string literal not displayed */
View Source
const Host = "https://www.notion.so/"
View Source
const HugoBlogHeaderTpl = `` /* 335-byte string literal not displayed */
View Source
const Mid = `` /* 664-byte string literal not displayed */
View Source
const Tail = `</body>
</html>
`
View Source
const TitleStyle = `` /* 155-byte string literal not displayed */

Variables

This section is empty.

Functions

func HugoPageUrl

func HugoPageUrl(title string, pageId string) string

func PageCategory

func PageCategory(m *meta.PageMeta) (categories []string)

func PageContent

func PageContent(pageId string, page *rod.Page) (content string, err error)

func PageDesc

func PageDesc(page *rod.Page) (content string, err error)

func PageTile

func PageTile(page *rod.Page) (title, titleHtml string, err error)

Types

type Blog

type Blog struct {
	Browser *rod.Browser
}

func NewBlog

func NewBlog() *Blog

func (*Blog) Close

func (b *Blog) Close() error

func (*Blog) HugoBlog

func (b *Blog) HugoBlog(pageId string, pageMeta *meta.PageMeta) (content string, err error)

func (*Blog) PageIndex

func (b *Blog) PageIndex(pageId string) (subPages []string, err error)

type HugoBlogMeta

type HugoBlogMeta struct {
	Title       string   `json:"title"`
	SubTitle    string   `json:"sub_title"`
	Excerpt     string   `json:"excerpt"`
	Description string   `json:"description"`
	Date        string   `json:"date"`
	Image       string   `json:"image"`
	Tags        []string `json:"tags"`
	Category    []string `json:"category"`
	UrlPath     string   `json:"url_path"`
	Url         string   `json:"url"`
}

Jump to

Keyboard shortcuts

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