build

package
v0.0.0-...-ad80bd6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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

func CleanupExistingFile(filepath string) error

Removes a file if it already exists

func CreateDirectory

func CreateDirectory(dir string) error

Creates a directory if it doesn't exist

func ReadYAMLFile

func ReadYAMLFile(filename string, out interface{}) error

Read and parse a YAML file into the provided interface

func WriteBuildFile

func WriteBuildFile(filename string, data []byte) error

Write a file that we've created in the build stage

Types

type BuildFileManager

type BuildFileManager struct {
	OutputPath string
	DataDir    string
}

func NewBuildFileManager

func NewBuildFileManager(filename string) *BuildFileManager

func (*BuildFileManager) PrepareAndWrite

func (dm *BuildFileManager) PrepareAndWrite(data []byte) error

type Metatags

type Metatags struct {
	Section     string `json:"section"`
	TrailString string `json:"trail_string"`
}
type NavItem struct {
	Title   string    `yaml:"title"`
	URL     string    `yaml:"url"`
	Submenu []NavItem `yaml:"submenu,omitempty"`
}

type PageMetadata

type PageMetadata struct {
	Metatags   Metatags    `json:"metatags"`
	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.

type TrailItem

type TrailItem struct {
	Title string `json:"title"`
	Path  string `json:"path"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL