frontend

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BlockEditorRenderer func(blocks []ui.BlockInterface) string
	Logger              *slog.Logger
	Shortcodes          []cmsstore.ShortcodeInterface
	Store               cmsstore.StoreInterface
	CacheEnabled        bool
	CacheExpireSeconds  int
}

type FrontendInterface

type FrontendInterface interface {
	// Handler renders the frontend
	Handler(w http.ResponseWriter, r *http.Request)

	// StringHandler return the frontend as a HTML string
	StringHandler(w http.ResponseWriter, r *http.Request) string

	// TemplateRenderHtmlByID builds the HTML of a template based on its ID
	TemplateRenderHtmlByID(r *http.Request, templateID string, options TemplateRenderHtmlByIDOptions) (string, error)
}

func New

func New(config Config) FrontendInterface

type LanguageKey

type LanguageKey struct{}

type TemplateRenderHtmlByIDOptions

type TemplateRenderHtmlByIDOptions struct {
	PageContent         string
	PageCanonicalURL    string
	PageMetaDescription string
	PageMetaKeywords    string
	PageMetaRobots      string
	PageTitle           string
	Language            string
}

Jump to

Keyboard shortcuts

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