content

package
v0.0.0-...-4d8c88f Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	Type    PageType
	Content []byte

	FrontMatter               *viper.Viper
	ContentWithoutFrontmatter []byte

	Path                     string
	PathWithoutExtension     string
	Filename                 string
	FilenameWithoutExtension string

	// Used to determine the order of pages
	Weight int
}

func ReadPageFile

func ReadPageFile(path string, file afero.File) (Page, error)

func (*Page) LinkTitle

func (p *Page) LinkTitle() string

func (*Page) Title

func (p *Page) Title() string

type PageType

type PageType string
const (
	Markdown    PageType = "markdown"
	JetTemplate PageType = "jet"
	HTML        PageType = "html"
	Notebook    PageType = "notebook"
	Unknown     PageType = "unknown"
)

func DetermineContentFileType

func DetermineContentFileType(filename string) PageType

Jump to

Keyboard shortcuts

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