docs

package
v0.0.0-...-e6d1dd3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: Apache-2.0 Copyright © 2021 Roberto Hidalgo <milpa@un.rob.mx>

SPDX-License-Identifier: Apache-2.0 Copyright © 2021 Roberto Hidalgo <milpa@un.rob.mx>

SPDX-License-Identifier: Apache-2.0 Copyright © 2021 Roberto Hidalgo <milpa@un.rob.mx>

SPDX-License-Identifier: Apache-2.0 Copyright © 2021 Roberto Hidalgo <milpa@un.rob.mx>

Index

Constants

This section is empty.

Variables

View Source
var LayoutTemplate []byte
View Source
var StaticFiles embed.FS

Functions

func DevelopmentStaticResourceHandler

func DevelopmentStaticResourceHandler() http.Handler

func EmbeddedStaticResourceHandler

func EmbeddedStaticResourceHandler() http.Handler
func FixLinks(contents []byte) []byte

func FromQuery

func FromQuery(query []string) ([]byte, error)

func RenderHandler

func RenderHandler(serverAddr string) func(http.ResponseWriter, *http.Request)

Types

type Entries

type Entries []*Entry

type Entry

type Entry struct {
	ID      string
	Title   template.HTML
	Entries Entries
}

func (*Entry) Append

func (i *Entry) Append() *Entry

func (*Entry) Last

func (i *Entry) Last() *Entry

type FrontMatter

type FrontMatter struct {
	Weight      int
	Description string
	Title       string
}

type Page

type Page struct {
	Name     string
	Path     string
	Weight   int
	Children *Pages
}

func (Page) Sort

func (p Page) Sort()

type Pages

type Pages []*Page

func (Pages) Len

func (p Pages) Len() int

func (Pages) Less

func (p Pages) Less(i, j int) bool

func (Pages) Swap

func (p Pages) Swap(i, j int)

type StyleName

type StyleName string
const (
	StyleDark  StyleName = "dark"
	StyleLight StyleName = "light"
	StylePlain StyleName = "plain"
)

type TemplateContents

type TemplateContents struct {
	Base           string
	IsHome         bool
	Permalink      string
	RelPermalink   string
	Content        template.HTML
	Description    string
	Tree           *Page
	TOC            *Entries
	CommandPattern string
}

Jump to

Keyboard shortcuts

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