Documentation ¶
Index ¶
- type Namespace
- func (ns *Namespace) AbsLangURL(a interface{}) (template.HTML, error)
- func (ns *Namespace) AbsURL(a interface{}) (template.HTML, error)
- func (ns *Namespace) Anchorize(a interface{}) (string, error)
- func (ns *Namespace) Parse(rawurl interface{}) (*url.URL, error)
- func (ns *Namespace) Ref(in interface{}, refs ...string) (template.HTML, error)
- func (ns *Namespace) RelLangURL(a interface{}) (template.HTML, error)
- func (ns *Namespace) RelRef(in interface{}, refs ...string) (template.HTML, error)
- func (ns *Namespace) RelURL(a interface{}) (template.HTML, error)
- func (ns *Namespace) URLize(a interface{}) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace provides template functions for the "urls" namespace.
func (*Namespace) AbsLangURL ¶
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) Anchorize ¶ added in v0.40.1
Anchorize creates sanitized anchor names that are compatible with Blackfriday.
func (*Namespace) Parse ¶ added in v0.30.1
Parse parses rawurl into a URL structure. The rawurl may be relative or absolute.
func (*Namespace) RelLangURL ¶
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.
Click to show internal directories.
Click to hide internal directories.