Documentation ¶
Overview ¶
Package slug provides functions for translating page titles into a representation that is safe to use in URLs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Slugifier ¶
type Slugifier struct {
// contains filtered or unexported fields
}
Slugifyer provides a method to clean strings for the use in URLs.
func NewSlugifier ¶
NewSlugifyer returns a initialized Slugifyer instance.
func (*Slugifier) Slugify ¶
Slugify takes a string and returns a SEO friendly normalized version of that string. Normalization applies a set of transformations to the string, e.g. lower-casing, trimming whitespace and replacing certain unicode characters/symbols. See the test cases for some examples.
Click to show internal directories.
Click to hide internal directories.