Clean URLs

Clean URLs make your site URLs look better and more professional.

How It Works

With clean URLs enabled:

SourceOutputURL
about.mdabout/index.html/about/
blog/post.mdblog/post/index.html/blog/post/

Enabling Clean URLs

Add cleanurl: true to your frontmatter:

layout: _layouts._main.html
title: About
cleanurl: true

Global Clean URLs

To enable clean URLs for all pages, you can create a custom postprocessor or set it in each file's frontmatter.

Linking Between Pages

When using clean URLs, link to the directory path:

<a href="/about/">About</a>
<a href="/blog/my-post/">My Post</a>

Index Files

index.md files are already at the root of their directory, so cleanurl has no effect on them.