Documentation
¶
Overview ¶
Package theme defines the ThemePlugin capability interface for huan's theme plugin system. Themes are plugins that provide templates, template functions, and static assets for site rendering.
All types are aliased from pkg/plugin so .so plugins share the same type identity.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager 管理主题插件的生命周期和状态。
func (*Manager) ListAvailable ¶
func (m *Manager) ListAvailable() []ThemePlugin
ListAvailable 列出所有注册了 ThemePlugin 能力的插件。
type ShortcodeProvider ¶
type ShortcodeProvider = pkgplugin.ShortcodeProvider
type TemplateEntry ¶
TemplateEntry is a helper type for accessing template data from a map.
func DecodeTemplates ¶
func DecodeTemplates(entries []map[string]string) []TemplateEntry
DecodeTemplates parses template entries returned by ThemePlugin.Templates().
type ThemeHooks ¶
type ThemeHooks = pkgplugin.ThemeHooks
type ThemeInfo ¶
type ThemeInfo struct {
Name string
Version string
Author string
Description string
Screenshot string
Tags []string
MinHuanVer string
}
ThemeInfo is a helper type for accessing theme metadata from a map. The ThemePlugin.Info() method returns map[string]any for cross-module compatibility. Use DecodeInfo() to parse it.
func DecodeInfo ¶
DecodeInfo parses a map returned by ThemePlugin.Info() into ThemeInfo.
type ThemePlugin ¶
type ThemePlugin = pkgplugin.ThemePlugin
All types are aliased from pkg/plugin so .so plugins share the same type identity.