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: 7 Imported by: 0



Package absolute converts relative file references in HTML documents to absolute paths. This is useful when working with plugins like "layout" and "collection", which can render a page’s content from the context of a different directory (imagine an index page showing inline previews of blog posts). This plugin makes it easy to fix incorrect relative file references by making sure all paths are absolute before content is featured on other sections of your site.



This section is empty.


This section is empty.


This section is empty.


type Absolute

type Absolute struct {
	// contains filtered or unexported fields

Absolute chainable plugin context.

func New

func New() *Absolute

New creates absolute new instance of the Absolute plugin.

func (*Absolute) Attributes

func (self *Absolute) Attributes(attributes ...string) *Absolute

Attributes sets the attributes which are scanned for relative URLs (default: "href", "src").

func (*Absolute) BaseUrl

func (self *Absolute) BaseUrl(baseUrl string) *Absolute

BaseUrl sets the base URL which is prepended to absolute-converted relative paths.

func (*Absolute) Initialize

func (*Absolute) Initialize(context *goldsmith.Context) error

func (*Absolute) Name

func (*Absolute) Name() string

func (*Absolute) Process

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