files

package
v0.0.0-...-5b3a7c8 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The NPM package.json "template" file.
	FilenamePackageHugoJSON = "package.hugo.json"
	// The NPM package file.
	FilenamePackageJSON = "package.json"
)
View Source
const (
	ComponentFolderArchetypes = "archetypes"
	ComponentFolderStatic     = "static"
	ComponentFolderLayouts    = "layouts"
	ComponentFolderContent    = "content"
	ComponentFolderData       = "data"
	ComponentFolderAssets     = "assets"
	ComponentFolderI18n       = "i18n"

	FolderResources = "resources"
	FolderJSConfig  = "_jsconfig" // Mounted below /assets with postcss.config.js etc.
)

Variables

Functions

func IsComponentFolder

func IsComponentFolder(name string) bool

func IsContentExt

func IsContentExt(ext string) bool

func IsContentFile

func IsContentFile(filename string) bool

func IsHTMLFile

func IsHTMLFile(filename string) bool

func IsIndexContentFile

func IsIndexContentFile(filename string) bool

func ResolveComponentFolder

func ResolveComponentFolder(filename string) string

ResolveComponentFolder returns "content" from "content/blog/foo.md" etc.

Types

type ContentClass

type ContentClass string
const (
	ContentClassLeaf    ContentClass = "leaf"
	ContentClassBranch  ContentClass = "branch"
	ContentClassFile    ContentClass = "zfile" // Sort below
	ContentClassContent ContentClass = "zcontent"
)

func ClassifyContentFile

func ClassifyContentFile(filename string, open func() (afero.File, error)) ContentClass

func (ContentClass) IsBundle

func (c ContentClass) IsBundle() bool

Jump to

Keyboard shortcuts

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