Back to

Package summary

Latest Go to latest

The latest major version is .

Published: Aug 14, 2020 | License: MIT | Module:


Package summary generates a summary and title for HTML files using CSS selectors. This plugin is useful when combined with other plugins such as "collection" to create blog post previews.


type Summary

type Summary struct {
	// contains filtered or unexported fields

Summary chainable context.

func New

func New() *Summary

New creates a new instance of the Summary plugin.

func (*Summary) Initialize

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

func (*Summary) Name

func (*Summary) Name() string

func (*Summary) Process

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

func (*Summary) SummaryKey

func (plugin *Summary) SummaryKey(key string) *Summary

SummaryKey sets the metadata key used to store the file summary (default: "Summary").

func (*Summary) SummaryPath

func (plugin *Summary) SummaryPath(path string) *Summary

SummaryPath sets the CSS path used to retrieve the file summary (default: "p").

func (*Summary) TitleKey

func (plugin *Summary) TitleKey(key string) *Summary

TitleKey sets the metadata key used to store the file title (default: "Title").

func (*Summary) TitlePath

func (plugin *Summary) TitlePath(path string) *Summary

TitlePath sets CSS path used to retrieve the file title (default: "h1").

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier