content

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LinkListingTemplate *template.Template
View Source
var PageTemplate *template.Template

Functions

func AllCategories

func AllCategories(pages map[string]*Page) []string

func AllPageTitles

func AllPageTitles(pages map[string]*Page) []string

func CreateSpecialPages

func CreateSpecialPages(pages map[string]*Page) error

func DiscoverPages

func DiscoverPages(path string) (map[string]*Page, error)

func OutputAllPagesToDisk

func OutputAllPagesToDisk(pages map[string]*Page, outputDir string) error

func PagesByCategory

func PagesByCategory(pages map[string]*Page) map[string][]*Page
func PopulateBacklinks(pages map[string]*Page)

Types

type LinkListingData

type LinkListingData struct {
	LinkList []string
}

type Page

type Page struct {
	Title         string
	Path          *string
	LinksTo       []string
	Backlinks     []string
	Meta          PageMeta
	ParsedContent []byte
}

func FindRootPage

func FindRootPage(pages map[string]*Page) (*Page, error)

func ParsePageFile

func ParsePageFile(path string) (Page, error)

type PageData

type PageData struct {
	Title   string
	Content template.HTML
}

type PageMeta

type PageMeta struct {
	Categories []string   `toml:"categories"`
	Date       *time.Time `toml:"date"`
	Redirect   *string    `toml:"redirect"`
	Root       bool       `toml:"root"`
	YoutubeId  string     `toml:"youtube_id"`
}

type PageTemplateData

type PageTemplateData struct {
	AllPageTitles []string
	Page          *Page
	Content       template.HTML
}

type WikiLinkResolver

type WikiLinkResolver struct {
	// contains filtered or unexported fields
}
func (r WikiLinkResolver) ResolveWikilink(node *wikilink.Node) (destination []byte, err error)

Jump to

Keyboard shortcuts

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