site icon
Tokimeki
Routing and blog navigation

By default, there are two static pages, Home and About, and all others are related to blog posts.

The configuration of the routing in this blog template

PageRouteExample URL
Homeapp/page.tsx/
Aboutapp/about/page.tsx/about
Blog
(All)
app/blog/page.tsx/blog
Blog
(page)
app/blog/page/[number]/page.tsx/blog/page/[number]
Postapp/blog/[slug]/page.tsx/blog/[slug]
Categories
(Top)
app/categories/page.tsx/categories
Categoriesapp/categories/[category]
/page.tsx
/categories/[category]
Categories
(Page)
app/categories/[category]
/[page]/[number]/page.tsx
/categories/[category]
/page/[number]
Tags
(Top)
app/tags/page.tsx/tags
Tagsapp/tags/[tag]/page.tsx/tags/[tag]
Tags
(Page)
app/tags/[tag]
/page/[number]/page.tsx
/tags/[tag]
/page/[number]
Archive
(Top)
app/archive/page.tsx/archive
Archiveapp/archive/[yy_mm]/page.tsx/archive/[yy_mm]
Archive
(Page)
app/archive/[yy_mm]
/page/[number]/page.tsx
/archive/[yy_mm]
/page/[number]

How to display a list of blog articles

Category

To display a list of a specific category, such as "Food", you can follow these steps:

  • In the front matter of the Markdown file, Fill in category: "Food".
  • Access the list using the URL /categories/Food.

Tag

To display a list of a specific tag, such as "news", you can follow these steps:

  • In the front matter of the Markdown file, Fill in tags: ["news"].
  • Access the list using the URL /tags/news.

Archive

The current path for displaying the blog archive is accessible in the format of archive/2023_03, where the year and month are specified.

This format allows you to access the blog archive for a specific month and year.

Pagination

Currently, the blog list page paginates based on the value of the blog.postPerPage variable in siteMetadata.js.
When you access /blog/page/1, it will take you to the first page of the blog list.
Similarly, paging is also supported for categories, tags, and archive.


May 04, 2023