Out of the box, Pelican generated URLs are unclean, i.e. they have .html appended. Elegant lets you use clean URLs with minimal configuration.

Mandatory

To use clean URLs, you server must support it.

Categories, Tags and Archives

In your Pelican configuration set following values

TAGS_URL = "tags"
CATEGORIES_URL = "categories"
ARCHIVES_URL = "archives"

With it set, your categories, tags and archives will be served from following links,

  1. /categories
  2. /tags
  3. /archives

If you do not set the variables then the URLs will become

  1. /categories.html
  2. /tags.html
  3. /archives.html

Articles

For clean URLs for articles, just set

ARTICLE_URL = "{slug}"

Pages

For pages, set

PAGE_URL = "{slug}"
PAGE_SAVE_AS = "{slug}.html"

For search page, set

SEARCH_URL = "search"

Понравилась статья? Расскажите о ней на: TwitterFacebookEmail


Talha Mansoor is the creator and lead developer of Elegant theme

Что почитать


Дата

Категория

Advanced Features

Тэги

Будьте с нами