shared

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLanguage

func GetLanguage(r *http.Request) string

GetLanguage returns the language query parameter.

func GetParentDirectory added in v1.3.0

func GetParentDirectory(path string) string

GetParentDirectory returns the parent directory for given path or an empty string if it is root.

func LoadPage

func LoadPage(r *http.Request, path, language string) (*cms.Content, error)

LoadPage loads a page for the given path and parses it into a cms.Content object.

func SavePage

func SavePage(page *cms.Content, path string) error

SavePage saves a page to the given path.

Types

type Directory added in v1.3.0

type Directory struct {
	Name     string
	Path     string
	Children []Directory
}

Directory is a file system directory.

func ListDirectories added in v1.3.0

func ListDirectories(w http.ResponseWriter, path string, includeRoot bool) []Directory

ListDirectories returns the directory tree for given path.

Jump to

Keyboard shortcuts

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