Documentation ¶
Overview ¶
Package readers knows how to read different configuration files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckConfigFileFlag ¶ added in v0.5.6
func CheckConfigFileFlag(flag string)
CheckConfigFileFlag sets global var to --config flag value (or defaults to plenti.json).
Types ¶
type ContentType ¶
ContentType maps to field key/values for content types.
func GetTypeFields ¶
func GetTypeFields(typeFileContents []byte) (ContentType, error)
GetTypeFields reads the key/values for an individual content type JSON file.
type NpmConfig ¶
type NpmConfig struct { Dependencies map[string]string `json:"dependencies"` Module string `json:"module"` }
NpmConfig is the NPM configuration file values from package.json.
func GetNpmConfig ¶
GetNpmConfig reads the prod dependencies from package.json.
type SiteConfig ¶
type SiteConfig struct { Fingerprint string BuildDir string `json:"build"` BaseURL string `json:"baseurl"` Theme string `json:"theme"` EntryPointHTML string `json:"entrypoint_html"` EntryPointJS string `json:"entrypoint_js"` ThemeConfig map[string]ThemeOptions `json:"theme_config"` Local struct { Port int `json:"port"` } `json:"local"` Routes map[string]string `json:"routes"` CMS struct { Provider string `json:"provider"` Repo string `json:"repo"` RedirectUrl string `json:"redirect_url"` AppId string `json:"app_id"` Branch string `json:"branch"` } `json:"cms"` }
SiteConfig is the site's configuration file values.
func GetSiteConfig ¶
func GetSiteConfig(basePath string) (SiteConfig, string)
GetSiteConfig reads the site's configuration file values.
type ThemeOptions ¶
type ThemeOptions struct { URL string `json:"url"` Commit string `json:"commit"` Exclude []string `json:"exclude,omitempty"` }
ThemeOptions is the theme configuration information.
Click to show internal directories.
Click to hide internal directories.