Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoveNodeFromParent ¶ added in v0.54.0
RemoveNodeFromParent removes node from its parent node
Types ¶
type DirType ¶
type DirType struct {
// Dir name of dir
Dir string `yaml:"dir,omitempty"`
// Structure is the node content of dir
Structure []*Node `yaml:"structure,omitempty"`
}
DirType represents a directory node
type FileType ¶
type FileType struct {
// File is the renaming of the file from source. If Source is empty then File should contain the url
File string `yaml:"file,omitempty"`
// Source is the source of file. If empty File must be the url
Source string `yaml:"source,omitempty"`
// MultiSource is a file build from multiple sources
MultiSource []string `yaml:"multiSource,omitempty"`
}
FileType represent a file node
type FilesTreeType ¶
type FilesTreeType struct {
// FileTree is a tree url of a repo
FileTree string `yaml:"fileTree,omitempty"`
// ExcludeFiles files to be excluded
ExcludeFiles []string `yaml:"excludeFiles,omitempty"`
}
FilesTreeType represents a fileTree node
type ManifType ¶
type ManifType struct {
// Manifest is the manifest url
Manifest string `yaml:"manifest,omitempty"`
}
ManifType represents a manifest node
type Node ¶
type Node struct {
ManifType `yaml:",inline"`
FileType `yaml:",inline"`
DirType `yaml:",inline"`
FilesTreeType `yaml:",inline"`
// Proccessor determines which node processor to use
Processor string `yaml:"processor,omitempty"`
// Properties of the node
SkipValidation bool `yaml:"skipValidation,omitempty"`
// Frontmatter of the node
Frontmatter map[string]interface{} `yaml:"frontmatter,omitempty"`
// Type of node
Type string `yaml:"type,omitempty"`
// Path of node
Path string `yaml:"path,omitempty"`
// LinkResolution describes how links should be resolved when processing the given node
LinkResolution map[string]string `yaml:"linkResolution,omitempty"`
// contains filtered or unexported fields
}
Node represents a generic mnifest node
func ResolveManifest ¶
func ResolveManifest(url string, r registry.Interface, additionalTransformations ...NodeTransformation) ([]*Node, error)
ResolveManifest collects files in FileCollector from a given url and resourcehandlers.FileSource
func (*Node) HasContent ¶
HasContent returns true if the node is a document node
func (*Node) HugoPrettyPath ¶
HugoPrettyPath returns hugo pretty path
func (*Node) NodePath ¶
NodePath returns fully qualified name of this node i.e. Node.Path + Node.Name
func (*Node) RemoveParent ¶ added in v0.54.0
func (n *Node) RemoveParent()
RemoveParent removes parent of node
Click to show internal directories.
Click to hide internal directories.