From be032af761969caee6c30d9ead7e404adb1b81c9 Mon Sep 17 00:00:00 2001 From: Furkan Akkurt <71407287+furkanakkurt1335@users.noreply.github.com> Date: Tue, 20 Jun 2023 02:11:41 +0300 Subject: [PATCH] add functionality to display categories, like tags, in blog home page (#1482) Added the functionality to display categories on the front page of the blog, just like tags. --- _config.yml | 1 + _sass/_base.scss | 2 +- blog/index.html | 15 +++++++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index ca5b45d49c59..7f46951980ae 100644 --- a/_config.yml +++ b/_config.yml @@ -262,6 +262,7 @@ jekyll-archives: category: '/blog/category/:name/' display_tags: ['formatting', 'images', 'links', 'math', 'code'] # these tags will be displayed on the front page of your blog +display_categories: ['blockquotes'] # these categories will be displayed on the front page of your blog # ----------------------------------------------------------------------------- # Jekyll Scholar diff --git a/_sass/_base.scss b/_sass/_base.scss index 2165cb7ae088..fef69df04414 100644 --- a/_sass/_base.scss +++ b/_sass/_base.scss @@ -404,7 +404,7 @@ footer.sticky-bottom { } } -.tag-list { +.tag-category-list { border-bottom: 1px solid var(--global-divider-color); text-align: center; padding-top: 1rem; diff --git a/blog/index.html b/blog/index.html index ad629b2d70e7..074545a6df61 100644 --- a/blog/index.html +++ b/blog/index.html @@ -25,8 +25,8 @@

{{ site.blog_description }}

{% endif %} - {% if site.display_tags %} -
+ {% if site.display_tags or site.display_categories %} +
{% endif %}