package files

import "github.com/gohugoio/hugo/hugofs/files"

Index

Constants

const (
	ContentClassLeaf    = "leaf"
	ContentClassBranch  = "branch"
	ContentClassFile    = "zfile" // Sort below
	ContentClassContent = "zcontent"
)
const (
	ComponentFolderArchetypes = "archetypes"
	ComponentFolderStatic     = "static"
	ComponentFolderLayouts    = "layouts"
	ComponentFolderContent    = "content"
	ComponentFolderData       = "data"
	ComponentFolderAssets     = "assets"
	ComponentFolderI18n       = "i18n"

	FolderResources = "resources"
)

Variables

var (
	ComponentFolders = []string{
		ComponentFolderArchetypes,
		ComponentFolderStatic,
		ComponentFolderLayouts,
		ComponentFolderContent,
		ComponentFolderData,
		ComponentFolderAssets,
		ComponentFolderI18n,
	}
)

Functions

func ClassifyContentFile

func ClassifyContentFile(filename string) string

func IsComponentFolder

func IsComponentFolder(name string) bool

func IsContentExt

func IsContentExt(ext string) bool

func IsContentFile

func IsContentFile(filename string) bool

func ResolveComponentFolder

func ResolveComponentFolder(filename string) string

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

Source Files

classifier.go

Version
v0.64.1
Published
Feb 9, 2020
Platform
linux/amd64
Imports
4 packages
Last checked
3 hours ago

Tools for package owners.