hugo-cms/models/theme.go

41 lines
674 B
Go
Raw Normal View History

2025-01-26 22:26:15 +00:00
package models
2025-03-29 23:39:02 +00:00
import "io/fs"
2025-03-30 00:15:46 +00:00
type ThemeOptionType int
const (
ThemeOptionTypeString ThemeOptionType = iota
ThemeOptionTypeInt
)
type ThemeOption struct {
Name string
Label string
Description string
Type ThemeOptionType
DefaultValue string
}
2025-01-26 22:26:15 +00:00
type ThemeMeta struct {
2025-03-29 23:39:02 +00:00
ID string
Name string
2025-03-30 00:15:46 +00:00
// Options
Options []ThemeOption
2025-03-29 23:39:02 +00:00
// Source repo
URL string
OverlayFS fs.FS
Overlays map[string]string
2025-01-27 03:23:54 +00:00
// Indicates that this theme prefers posts have titles.
PreferTitle bool
// Indicates that the theme doesn't automatically put titles on pages
AddTitleToPages bool
2025-02-16 00:43:22 +00:00
// Page bundle for "blog" posts
2025-03-29 23:39:02 +00:00
BlogPostBundle string
2025-01-26 22:26:15 +00:00
}