goldsmith-components: Index | Files

package tags

import ""

Package tags builds tag clouds from file metadata. This makes it easy to create lists of all files tagged with a specific tag, as well as to see all tags globally used on a site.


Package Files


type TagInfo Uses

type TagInfo struct {
    Files    filesByPath
    SafeName string
    RawName  string
    Path     string

TagInfo contains site-wide information about a particular tag.

type TagState Uses

type TagState struct {
    Index string
    Tags  []string
    Info  map[string]TagInfo

TagState contains site-wide information about tags used on a site.

type Tags Uses

type Tags struct {
    // contains filtered or unexported fields

Tags chainable context.

func New Uses

func New() *Tags

New creates a new instance of the Tags plugin.

func (*Tags) BaseDir Uses

func (plugin *Tags) BaseDir(dir string) *Tags

BaseDir sets the base directory used to generate tag list files (default: "tags").

func (*Tags) Finalize Uses

func (plugin *Tags) Finalize(context *goldsmith.Context) error

func (*Tags) IndexMeta Uses

func (plugin *Tags) IndexMeta(meta map[string]interface{}) *Tags

IndexMeta sets the metadata which will be assigned to generated tag list files (default: {}).

func (*Tags) IndexName Uses

func (plugin *Tags) IndexName(name string) *Tags

IndexName sets the filename which will be used to create tag list files (default: "index.html").

func (*Tags) Initialize Uses

func (*Tags) Initialize(context *goldsmith.Context) (goldsmith.Filter, error)

func (*Tags) Name Uses

func (*Tags) Name() string

func (*Tags) Process Uses

func (plugin *Tags) Process(context *goldsmith.Context, inputFile *goldsmith.File) error

func (*Tags) StateKey Uses

func (plugin *Tags) StateKey(key string) *Tags

StateKey sets the meatadata key used to store site-wide tag information (default: "TagState").

func (*Tags) TagsKey Uses

func (plugin *Tags) TagsKey(key string) *Tags

TagsKey sets the metadata key used to get the tags for this file, stored as a slice of strings (default: "Tags").

Package tags imports 6 packages (graph). Updated 2019-04-08. Refresh now. Tools for package owners.