Documentation
¶
Overview ¶
Package fields provides baseplate's built-in field kinds, blocks and content types (page, site settings), plus the standard SEO fields.
Index ¶
Constants ¶
const ( PageType = "page" SettingsType = settings.Type )
Built-in content type names.
const ( TabSEO = "SEO" TabLLM = "LLM" // TabMedia holds the media library's settings (a catalog key). TabMedia = "tab.media" )
Tabs used by the standard field groups.
const ( Text = "text" Textarea = "textarea" RichText = "richtext" Slug = "slug" Number = "number" Bool = "bool" Select = "select" Image = "image" Email = "email" URL = "url" Relation = "relation" Group = "group" List = "list" Blocks = "blocks" // Date and DateTime store Unix seconds; the admin converts input in the // site's time zone, templates format with {{date v "long"}}. Date = "date" DateTime = "datetime" // Timezone is an IANA zone name ("Europe/Berlin"). Timezone = "timezone" )
Kind names.
Variables ¶
This section is empty.
Functions ¶
func RoutableFields ¶
RoutableFields wraps the fields of a routable type with title, slug and SEO.
func ValidCanonical ¶ added in v0.2.0
ValidCanonical reports whether s can be a canonical URL: absolute http(s), or a path from the site root ("/other/") that the build resolves against the base URL.
Types ¶
type Core ¶
type Core struct{}
Core registers the built-in kinds and types (page, settings). The app registers it before any other plugin. The built-in blocks are separate (CoreBlocks), so a site only offers the blocks it registers.
type CoreBlocks ¶
type CoreBlocks struct {
Only []string
}
CoreBlocks registers baseplate's generic content elements (heading, richtext, image, cta, article). Opt in with app.Use(fields.CoreBlocks{}); Only restricts it to some of them.
func (CoreBlocks) Name ¶
func (CoreBlocks) Name() string