pages

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: 18 Imported by: 0

Documentation

Overview

This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/.

This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/.

This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateApp

func CreateApp(name string, serveFS assetfs.ServeFS, reloadTemplates bool) *fiber.App

Types

type Menu []*MenuEntry
func (m Menu) Add(me *MenuEntry) Menu
func (m Menu) ByName() Menu

ByName sorts the menu by the name defined in the menu configuration.

func (m Menu) ByWeight() Menu

ByWeight sorts the menu by the weight defined in the menu configuration.

func (m Menu) Limit(n int) Menu

Limit limits the returned menu to n entries.

func (m Menu) Reverse() Menu

Reverse reverses the order of the menu entries.

func (m Menu) Sort() Menu

Sort sorts the menu by weight, name and then by identifier.

type MenuData struct {
	Entries Menu
	// contains filtered or unexported fields
}
func (m *MenuData) ResolvePage(path string) *content.Page
type MenuEntry struct {
	Page       *content.Page
	Identifier string
	Name       string
	Href       string

	Weight int

	Children Menu
	// contains filtered or unexported fields
}
func (m *MenuEntry) Title() string

type PagesHandler

type PagesHandler struct {
	templaterenderer.TemplateRenderer
	// contains filtered or unexported fields
}

func NewPagesHandler

func NewPagesHandler(spaceName string, templateRenderer templaterenderer.TemplateRenderer) *PagesHandler

func (*PagesHandler) Handle

func (h *PagesHandler) Handle(c *fiber.Ctx) error

Jump to

Keyboard shortcuts

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