Custom routes

Typlog allows you to customize URL formats for posts, episodes, and tags. Go to Settings → Customize routes, you can update all the URL routes there.

Routes

Post URL & Episode URL

Available variables for post URL and episode URL:

  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

Tag URL MUST end with /, available variables for tag URL:

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

Here are some examples:

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

Archive, Post list, & Episode list

List URL MUST end with /, no available variables.

  1. Archive: contains all posts, and episodes
  2. Post list: contains only posts
  3. Episode list: contains only episodes

Here is an example if you have both Posts and Episodes features on.

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

Language URL

If your site has multiple languages, contents can be grouped by their languages. The only available variable is {lang}.

Author URL

List contents by their authors. List URL MUST end with /, the only available variable is {username}.

Here is an example:

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

Find out your preferred URL styles.

Read more