hugo: github.com/spf13/hugo/tpl/urls Index | Files

package urls

import "github.com/spf13/hugo/tpl/urls"

Index

Package Files

init.go urls.go

type Namespace Uses

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

Namespace provides template functions for the "urls" namespace.

func New Uses

func New(deps *deps.Deps) *Namespace

New returns a new instance of the urls-namespaced template functions.

func (*Namespace) AbsLangURL Uses

func (ns *Namespace) AbsLangURL(a interface{}) (template.HTML, error)

AbsLangURL takes a given string and converts it to an absolute URL according to a page's position in the project directory structure and the current language.

func (*Namespace) AbsURL Uses

func (ns *Namespace) AbsURL(a interface{}) (template.HTML, error)

AbsURL takes a given string and converts it to an absolute URL.

func (*Namespace) Ref Uses

func (ns *Namespace) Ref(in interface{}, refs ...string) (template.HTML, error)

Ref returns the absolute URL path to a given content item.

func (*Namespace) RelLangURL Uses

func (ns *Namespace) RelLangURL(a interface{}) (template.HTML, error)

RelLangURL takes a given string and prepends the relative path according to a page's position in the project directory structure and the current language.

func (*Namespace) RelRef Uses

func (ns *Namespace) RelRef(in interface{}, refs ...string) (template.HTML, error)

RelRef returns the relative URL path to a given content item.

func (*Namespace) RelURL Uses

func (ns *Namespace) RelURL(a interface{}) (template.HTML, error)

RelURL takes a given string and prepends the relative path according to a page's position in the project directory structure.

func (*Namespace) URLize Uses

func (ns *Namespace) URLize(a interface{}) (string, error)

Package urls imports 5 packages (graph) and is imported by 1 packages. Updated 2017-05-22. Refresh now. Tools for package owners.