content

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

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
}

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 Parser added in v0.2.0

type Parser struct {
	DiscordUserResolver *extensions.DiscordUserResolver
}

func (*Parser) AllCategories added in v0.2.0

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

func (*Parser) AllPageTitles added in v0.2.0

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

func (*Parser) CreateSpecialPages added in v0.2.0

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

func (*Parser) DiscoverPages added in v0.2.0

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

func (*Parser) FindRootPage added in v0.2.0

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

func (*Parser) OutputAllPagesToDisk added in v0.2.0

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

func (*Parser) PagesByCategory added in v0.2.0

func (p *Parser) PagesByCategory(pages map[string]*Page) map[string][]*Page

func (*Parser) ParsePageFile added in v0.2.0

func (p *Parser) ParsePageFile(path string) (Page, error)
func (p *Parser) PopulateBacklinks(pages map[string]*Page)

type WikiLinkResolver

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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