Clone this wiki locally
A slug is a url-friendly representation of the name of a page. It should be unique across the site, should be all lower case, and not contain punctuation (beyond what fits in a url), non-ascii characters, or spaces. For example, here are some titles and their sluggifications.
- "My trip to the zoo" -> "my-trip-to-the-zoo"
- "This is a title. Or is it?" -> "this-is-a-title-or-is-it"
- "Books!" -> "books"
You can also manually specify a slug on a content file, with the metadata attribute
slug. For example
title: My awesome trip to the zoo last Thursday. slug: zoo
Since slugs are often used in urls, this can make your urls a lot nicer looking, instead of 100 character monsters. There are also times that you might reference a slug from a template, and short names are easier to remember and type.