You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.
mythmon edited this page Sep 8, 2011
·
2 revisions
Slug
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.