sitegen

package
v0.2.0-dev.11 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownKind = errors.New("decoy: unknown site kind")

ErrUnknownKind is Generate's refusal of a kind that has no folder of templates.

Functions

This section is empty.

Types

type File

type File = decoy.File

File is a file of a generated site, the type FromFiles takes.

func Generate

func Generate(kind string, seed []byte) ([]File, error)

Generate makes the files of a site of the given kind. The same kind and seed always give the same files, byte for byte; the result is meant for FromFiles.

func GenerateNamed

func GenerateNamed(kind string, seed []byte) ([]File, string, error)

GenerateNamed is Generate that also returns the brand the pages print (the site's own name, for naming it in the library).

type KindInfo

type KindInfo struct {
	ID     string `json:"id"`
	NameEN string `json:"name_en"`
	NameRU string `json:"name_ru"`
}

KindInfo describes a kind of generated site for the admin's list.

func Kinds

func Kinds() []KindInfo

Kinds lists the kinds of generated site, sorted by id.

Jump to

Keyboard shortcuts

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