Custom routes

Typlog allows you to customize the URL formats — the routes — for posts, episodes, pages, tags, etc. Go to Settings → Customize routes to make changes.

Routes

Post URL & Episode URL

Here are the available variables for post and episode URLs:

  1. {slug}, this parameter MUST be included in the URL.
  2. {lang}, the language of the post, e.g. en, ja, zh-hans.
  3. {year}, the year of the publish date.
  4. {month}, the month of the publish date.

Here are some examples:

URL format Example
/posts/{year}/{slug} /posts/2021/hello
/{lang}/{slug} /en/hello
/blog/{year}/{month}/{slug} /blog/2021/11/hello

Tag URL

Here are the available variables for tag URLs:

  1. {slug}, this parameter MUST be included in the URL.
  2. {lang}, the language of the tag, e.g. en, ja, zh-hans.

Tag URLs MUST end with a /.

Here are some examples:

URL format Example
/tags/{slug}/ /tags/design/
/{lang}/topic/{slug}/ /en/topic/design/

Archive, Post list, & Episode list

  1. The Archive contains both posts and episodes
  2. The Post list only contains posts
  3. The Episode list only contains episodes

There are no available variables for list URLs.

List URLs MUST end with a /.

Here are some examples (assuming you have both the Posts and Episodes features turned on):

URL URL format Example
Post /blog/{slug} /blog/hello
Post list /blog/
Episode /podcast/{slug} /podcast/026
Episode list /podcast/

Language URL

If your site supports languages, content can be grouped by language.

Here are the available variables for language URLs:

  1. {lang}, this parameter MUST be included in the URL.

Author URL

If your site supports authors, content can be grouped by author.

Here are the available variables for author URLs:

  1. {username}, this parameter MUST be included in the URL.

Author URLs MUST end with a /.

Here is an example:

URL format Example
/author/{name}/ /author/lepture/
Read more