builder

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package builder ...

Package builder ...

Package builder ...

Package builder ...

Package builder ...

Package builder ...

Package builder ...

Package builder ...

Package builder ...

Package builder ...

Package builder ...

Index

Constants

View Source
const (
	// BLANK represents the fontmatter-only template id used when generating the content file.
	BLANK string = "blank"
	// SAMPLE represents the sample-content template id used when generating the content file.
	SAMPLE string = "sample"
)
View Source
const (
	// API_SINGLE is a string representing the api template file
	// to be used when creating a metadata of type 'single'.
	API_SINGLE string = "api_single"
	// API_LIST is a string representing the api template file
	// to be used when creating a metadata of type 'list'.
	API_LIST string = "api_list"
	// LIB_SINGLE is a string representing the lib template file
	// to be used when creating a metadata of type 'single'.
	LIB_SINGLE string = "lib_single"
	// LIB_LIST is a string representing the libe template file
	//  to be used when creating a metadata of type 'single'.
	LIB_LIST string = "lib_list"
)
View Source
const (
	// SVELTE set svelte as the language used to scaffold a new page
	SVELTE string = "svelte"
	// MARKDOWN set markdown as the language used to scaffold a new page
	MARKDOWN string = "markdown"
)
View Source
const (
	DEFAULTS     string = "defaults"
	EXTERNALS    string = "externals"
	WEBSITE      string = "website"
	MENU         string = "menu"
	INIT_MENU    string = "init_menu"
	DOTENV       string = "dotenv"
	README       string = "readme"
	LICENSE      string = "license"
	THEME_CONFIG string = "theme_config"
	INDEXPAGE    string = "index"
)

constants representing different file names.

View Source
const (
	// API is a string for the 'api' folder.
	API string = "api"
	// INDEX is a string for the 'index' file.
	INDEX string = "index"
	// SLUG is a string for the 'slug' file.
	SLUG string = "slug"
	// LIB is a string for the 'lib' folder.
	LIB string = "lib"
)

Variables

This section is empty.

Functions

func GetContentBuilder

func GetContentBuilder(contentType string) iFileContentBuilder

GetContentBuilder returns an concrete implementation for iFileContentBuilder.

func NewDirector

func NewDirector(b iFileContentBuilder) *director

NewDirector create a director.

func NewMenuContentBuilder

func NewMenuContentBuilder() *menuContentBuilder

NewMenuContentBuilder create a menuContentBuilder struct.

func NewMetadataContentBuilder

func NewMetadataContentBuilder() *metadataContentBuilder

NewMetadataContentBuilder create a metadataContentBuilder struct.

func NewNoPageContentBuilder

func NewNoPageContentBuilder() *nopContentBuilder

NewNoPageContentBuilder create a nopContentBuilder struct.

func NewPageContentBuilder

func NewPageContentBuilder() *publicPageContentBuilder

NewPageContentBuilder create a publicPageContentBuilder struct.

func NewProjectBuilder

func NewProjectBuilder() *projectBuilder

NewProjectBuilder create a projectBuilder struct.

func NewResContentBuilder

func NewResContentBuilder() *resContentBuilder

NewResContentBuilder create a resContentBuilder struct.

func NewResourceContentBuilder

func NewResourceContentBuilder() *resourceContentBuilder

NewResourceContentBuilder create a resourceContentBuilder struct.

func NewThemeContentBuilder

func NewThemeContentBuilder() *themeContentBuilder

NewThemeContentBuilder create a themeContentBuilder struct.

Types

type Content

type Content struct {
	ContentType       string
	EmbeddedResources map[string]string
	PathToTplFile     string
	TemplateId        string
	TemplateData      *config.TemplateData
	Funcs             template.FuncMap
}

Content define the needed configs to run a Builder.

Jump to

Keyboard shortcuts

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