Documentation ¶
Overview ¶
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.
Index ¶
- type Absolute
- func (self *Absolute) Attributes(attributes ...string) *Absolute
- func (self *Absolute) BaseUrl(baseUrl string) *Absolute
- func (*Absolute) Initialize(context *goldsmith.Context) error
- func (*Absolute) Name() string
- func (self *Absolute) Process(context *goldsmith.Context, inputFile *goldsmith.File) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Absolute ¶
type Absolute struct {
// contains filtered or unexported fields
}
Absolute chainable plugin context.
func (*Absolute) Attributes ¶
Attributes sets the attributes which are scanned for relative URLs (default: "href", "src").
Click to show internal directories.
Click to hide internal directories.