hugo-cms/models/theme.go
2025-03-30 11:15:46 +11:00

41 lines
674 B
Go

package models
import "io/fs"
type ThemeOptionType int
const (
ThemeOptionTypeString ThemeOptionType = iota
ThemeOptionTypeInt
)
type ThemeOption struct {
Name string
Label string
Description string
Type ThemeOptionType
DefaultValue string
}
type ThemeMeta struct {
ID string
Name string
// Options
Options []ThemeOption
// Source repo
URL string
OverlayFS fs.FS
Overlays map[string]string
// Indicates that this theme prefers posts have titles.
PreferTitle bool
// Indicates that the theme doesn't automatically put titles on pages
AddTitleToPages bool
// Page bundle for "blog" posts
BlogPostBundle string
}