goldsmith-components: github.com/FooSoft/goldsmith-components/plugins/index Index | Files

package index

import "github.com/FooSoft/goldsmith-components/plugins/index"

Package index creates metadata for directory listings and generates index pages for every directory which contains other files. This is useful for creating static directory views for downloads, image galleries, etc.

Index

Package Files

index.go

type Entry Uses

type Entry struct {
    Name  string
    Path  string
    IsDir bool
    File  *goldsmith.File
}

Entry contains information about a directory item.

type Index Uses

type Index struct {
    // contains filtered or unexported fields
}

Index chainable plugin context.

func New Uses

func New(meta map[string]interface{}) *Index

New creates a new instance of the Index plugin. The meta parameter allows additional metadata to be provided for generated indices.

func (*Index) FilesKey Uses

func (plugin *Index) FilesKey(key string) *Index

FilesKey sets the metadata key used to access the files in the current directory (default: "Files").

func (*Index) Finalize Uses

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

func (*Index) IndexFilename Uses

func (plugin *Index) IndexFilename(filename string) *Index

IndexFilename sets the name of the file to be created as the directory index (default: "index.html").

func (*Index) Name Uses

func (*Index) Name() string

func (*Index) Process Uses

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

Package index imports 5 packages (graph). Updated 2019-07-08. Refresh now. Tools for package owners.