Documentation
¶
Overview ¶
Package theme provides functions for working with verless themes.
Instead of juggling around with theme paths on your own, you should use the convenience functions from this package.
Index ¶
- Constants
- func AssetsPath(path, name string) string
- func CssPath(path, name string) string
- func Exists(path, name string) bool
- func GeneratedPath(path, name string) string
- func JsPath(path, name string) string
- func Path(path, name string) string
- func RunBeforeHooks(path, name string) error
- func TemplatePath(path, name string) string
- type Config
Constants ¶
const ( TemplatesDir string = "templates" GeneratedDir string = "generated" CssDir string = "css" JsDir string = "js" // AssetsDir is the directory containing CSS and JavaScript files. // It will replace CssDir and JsDir in a future release. AssetsDir string = "assets" Default string = "default" PageTemplate string = "page.html" ListPageTemplate string = "list-page.html" )
Variables ¶
This section is empty.
Functions ¶
func AssetsPath ¶ added in v0.4.8
AssetsPath returns the assets directory path of a given theme.
func Exists ¶
Exists determines whether a theme with the provided name inside the given path exists.
func GeneratedPath ¶ added in v0.4.8
GeneratedPath returns the generated directory path of a given theme.
func Path ¶ added in v0.4.8
Path returns the directory path for the theme with the given name inside the given path. Path does not ensure that the directory physically exists.
func RunBeforeHooks ¶
RunBeforeHooks executes all pre-build commands specified in the configuration of the theme with the specified name.
Note that the command context directory is the the theme directory instead of the project directory.
func TemplatePath ¶ added in v0.4.8
TemplatePath returns the template directory path of a given theme.