Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FilePathSeparator = string(filepath.Separator)
Functions ¶
func AbsPathify ¶
AbsPathify creates an absolute path if given a working dir and arelative path. If already absolute, the path is just cleaned.
Types ¶
type BaseURL ¶
type BaseURL struct {
// contains filtered or unexported fields
}
A BaseURL in Hugo is normally on the form scheme://path, but the form scheme: is also valid (mailto:hugo@rules.com).
type Paths ¶
type Paths struct { Fs *hugofs.Fs Cfg config.Provider BaseURL // If the baseURL contains a base path, e.g. https://example.com/docs, then "/docs" will be the BasePath. // This will not be set if canonifyURLs is enabled. BasePath string // Directories // TODO(bep) when we have trimmed down mos of the dirs usage outside of this package, make // these into an interface. ContentDir string ThemesDir string WorkingDir string AbsResourcesDir string AbsPublishDir string // pagination path handling PaginatePath string PublishDir string DisablePathToLower bool RemovePathAccents bool UglyURLs bool CanonifyURLs bool Language *langs.Language Languages langs.Languages DefaultContentLanguage string AllThemes []ThemeConfig // contains filtered or unexported fields }
func (*Paths) AbsPathify ¶
AbsPathify creates an absolute path if given a relative path. If already absolute, the path is just cleaned.
func (*Paths) GetLangSubDir ¶
GetLangSubDir returns the given language's subdir if needed.
func (*Paths) GetLanguagePrefix ¶
type ThemeConfig ¶
type ThemeConfig struct { // The theme name as provided by the folder name below /themes. Name string // Optional configuration filename (e.g. "/themes/mytheme/config.json"). ConfigFilename string // Optional config read from the ConfigFile above. Cfg config.Provider }
func CollectThemes ¶
Click to show internal directories.
Click to hide internal directories.