Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way I can render /categories page ? #4018

gourav opened this issue Dec 30, 2019 · 1 comment

Is there any way I can render /categories page ? #4018

gourav opened this issue Dec 30, 2019 · 1 comment


Copy link

@gourav gourav commented Dec 30, 2019

I want to create a view like this. Basically idea is to have a dedicated page showing different categories in grid format and mentioning their post count as well. I can maintain a JSON file in a theme I am writing to pull out respective icons for the categories, but I can't seem to figure out the way to create a page that is served when /categories is requested.

Would this require development of a plugin ?


This comment has been minimized.

Copy link

@dailyrandomphoto dailyrandomphoto commented Dec 30, 2019

You can follow these steps:

  1. hexo new page categories
  2. add layout: categories to the front-matter of just created page. source/categories/
  3. add a layout file to your theme. e.g. themes/landscape/layout/categories.ejs
  4. use list_categories helper build your category list. example
  5. use transform option or other hacks to show your icons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.