v0.0.0-...-72c21ce Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 6 Imported by: 0



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.



This section is empty.


This section is empty.


This section is empty.


type Entry

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

Entry contains information about a directory item.

type Index

type Index struct {
	// contains filtered or unexported fields

Index chainable plugin context.

func New

func New(indexProps 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

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

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

func (*Index) Finalize

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

func (*Index) IndexFilename

func (self *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

func (*Index) Name() string

func (*Index) Process

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL