diff --git a/README.md b/README.md index 6c90de84..ff2bc788 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,22 @@ You have two options for the list of blog posts on the home page: show_all_posts: true ``` + +### Category and Tag section on home page +You can show a category and tag section on the home page by editing the hexo ```_config.yml``` file. + + ```yml + # Show a Tags section on the home page + show_tags_section: true + + # Show a Category section on the home page + show_category_section: true + ``` +The theme has a provision to make separate tags and category pages. For this, you need to follow these steps: +- make a new hexo page. +- changing the layout to ```tags``` for a tags page or ```categories``` for a categories page. +- adding the relevant paths in your nav menu. + ### Projects list Create a projects file `source/_data/projects.json` to show a list of your projects on the index page. diff --git a/_config.yml b/_config.yml index 6cf87edc..69dbb65c 100644 --- a/_config.yml +++ b/_config.yml @@ -19,6 +19,11 @@ nav: articles: /archives/ projects: http://github.com/probberechts +# Show a Tags section on the home page +show_tags_section: true + +# Show a Category section on the home page +show_category_section: true # Links to your social media accounts. # The 'icon' keys should correspond to Fontawesome icon names diff --git a/layout/categories.ejs b/layout/categories.ejs new file mode 100644 index 00000000..d44761c0 --- /dev/null +++ b/layout/categories.ejs @@ -0,0 +1,26 @@ +<%- partial('_partial/head') %> +
No categories found.
+ <% } %> +No categories found.
+ <% } %> +No tags found.
+ <% } %> +