hugo: github.com/gohugoio/hugo/hugofs/files Index | Files

package files

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

Index

Package Files

classifier.go

Constants

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,
    }
)

func IsComponentFolder Uses

func IsComponentFolder(name string) bool

func IsContentExt Uses

func IsContentExt(ext string) bool

func IsContentFile Uses

func IsContentFile(filename string) bool

func IsHTMLFile Uses

func IsHTMLFile(filename string) bool

func ResolveComponentFolder Uses

func ResolveComponentFolder(filename string) string

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

type ContentClass Uses

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

func ClassifyContentFile Uses

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

func (ContentClass) IsBundle Uses

func (c ContentClass) IsBundle() bool

Package files imports 9 packages (graph) and is imported by 50 packages. Updated 2020-03-26. Refresh now. Tools for package owners.