admin

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

func New

func New(options AdminOptions) (*admin, error)

Types

type AdminOptions

type AdminOptions struct {
	// BlockEditorDefinitions is the block definitions to use for the block editor
	// these definitions must also be registered in the frontend
	BlockEditorDefinitions []blockeditor.BlockDefinition

	// FuncLayout is an optional function to use to render the admin interface inside
	// this is convinient when you want to use your own layout to wrap the admin
	// interface, i.e. completely replace the default layout with your own
	// admin panel with your own branding, logos, etc.
	FuncLayout func(title string, body string, options struct {
		Styles     []string
		StyleURLs  []string
		Scripts    []string
		ScriptURLs []string
	}) string

	// Logger is the logger to use to log any errors. Optional
	Logger *slog.Logger

	// Store is the cmsstore.StoreInterface to use by the admin panel
	Store cmsstore.StoreInterface

	AdminHomeURL string

	// flags holds a map of feature flags for internal use
	Flags map[string]bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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