Documentation
¶
Index ¶
Constants ¶
View Source
const ConfigFile = "gwconfig.yaml"
View Source
const HelpersDir = "tpl"
View Source
const PublicDir = "public"
View Source
const SourceDir = "source"
View Source
const TemplateExt = ".html"
View Source
const ThemesDir = "themes"
View Source
const UploadsDir = "uploads"
View Source
const Version = "1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexConfig ¶
type MenuConfig ¶
type PostConfig ¶
type PostConfig struct { Title string Blurb string Tags []string SkipIndex bool `yaml:"skip_index"` SkipPublish bool `yaml:"skip_publish"` CreatedAt time.Time UpdatedAt time.Time }
PostConfig contains configuration information for a given post.
type SearchConfig ¶
type SiteConfig ¶
type SiteConfig struct { TimeFormat string `default:"2006-01-02 15:04:05"` Title string Theme ThemeConfig Copyright string ConfigPath string // path to config yaml Homepage string Index IndexConfig PublicDir string `yaml:"public_directory"` RootDir string SourceDir string // ThemeDir string `yaml:"theme_directory,ignore"` Language string `default:"en"` Prefix string `yaml:"uri_prefix"` Search SearchConfig `yaml:"search"` Version string PostsPerPage int `default:"2"` Menu MenuConfig `yaml:"menu"` // contains filtered or unexported fields }
func SiteFromConfig ¶
func SiteFromConfig(files fsys.FileSystem) (*SiteConfig, error)
func (SiteConfig) ThemeDir ¶
func (s SiteConfig) ThemeDir() string
func (*SiteConfig) UpdateMenuPrefixes ¶
func (s *SiteConfig) UpdateMenuPrefixes(item *MenuItem)
UpdateMenuPrefixes recursively adds the site prefix to the menu items.
type ThemeAuthor ¶
type ThemeConfig ¶
type ThemeInfo ¶
type ThemeInfo struct { Name string Description string Author ThemeAuthor }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.