Documentation
¶
Index ¶
- func BuildDeprecations() error
- func BuildFeatureFlags() error
- func BuildPageMetadata() error
- func BuildRedirects() error
- func CleanupExistingFile(filepath string) error
- func CreateDirectory(dir string) error
- func ReadYAMLFile(filename string, out interface{}) error
- func WriteBuildFile(filename string, data []byte) error
- type BuildFileManager
- type Metatags
- type NavItem
- type PageMetadata
- type Redirect
- type RedirectsFile
- type TrailItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDeprecations ¶
func BuildDeprecations() error
func BuildFeatureFlags ¶
func BuildFeatureFlags() error
func BuildPageMetadata ¶
func BuildPageMetadata() error
func BuildRedirects ¶
func BuildRedirects() error
BuildRedirects generates the GitLab Pages _redirects file from the YAML source.
func CleanupExistingFile ¶
Removes a file if it already exists
func CreateDirectory ¶
Creates a directory if it doesn't exist
func ReadYAMLFile ¶
Read and parse a YAML file into the provided interface
func WriteBuildFile ¶
Write a file that we've created in the build stage
Types ¶
type BuildFileManager ¶
func NewBuildFileManager ¶
func NewBuildFileManager(filename string) *BuildFileManager
func (*BuildFileManager) PrepareAndWrite ¶
func (dm *BuildFileManager) PrepareAndWrite(data []byte) error
type PageMetadata ¶
type PageMetadata struct {
TrailItems []TrailItem `json:"trail_items"`
}
type Redirect ¶
type Redirect struct {
From string `yaml:"from"`
To string `yaml:"to"`
RemoveDate string `yaml:"remove_date,omitempty"`
}
Redirect represents a single redirect entry in the YAML file.
type RedirectsFile ¶
type RedirectsFile struct {
Redirects []Redirect `yaml:"redirects"`
}
RedirectsFile represents the structure of the redirects YAML file.
Click to show internal directories.
Click to hide internal directories.