From 297c436aedd6e7c7a133992e2530fa85a3fc8f48 Mon Sep 17 00:00:00 2001 From: Paul Yu Date: Mon, 19 Aug 2024 14:31:31 -0700 Subject: [PATCH] chore: adding new ai category for blog and improve category capitalization in navigation and layout files --- blog/_includes/nav_list | 10 +++++++++- blog/_layouts/categories.html | 16 ++++++++++++++-- blog/_layouts/category.html | 9 ++++++++- blog/_pages/category-ai.html | 7 +++++++ 4 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 blog/_pages/category-ai.html diff --git a/blog/_includes/nav_list b/blog/_includes/nav_list index 53d7cbc2..2d8d42bc 100644 --- a/blog/_includes/nav_list +++ b/blog/_includes/nav_list @@ -11,7 +11,15 @@
  • Browse all
  • {% for category in site.categories %} {% capture category_name %}{{ category | first }}{% endcapture %} -
  • {{ category_name | capitalize }}
  • +
  • + + {% if category_name.size <= 2 %} + {{ category_name | upcase }} + {% else %} + {{ category_name | capitalize }} + {% endif %} + +
  • {% endfor %} diff --git a/blog/_layouts/categories.html b/blog/_layouts/categories.html index 3291044e..cb1bd393 100644 --- a/blog/_layouts/categories.html +++ b/blog/_layouts/categories.html @@ -17,7 +17,13 @@ {% if category[1].size == i %}
  • - {{ category[0] | capitalize }} {{ i }} + + {% if category[0].size <= 2 %} + {{ category[0] | upcase }} + {% else %} + {{ category[0] | capitalize }} + {% endif %} + {{ i }}
  • {% endif %} @@ -30,7 +36,13 @@ {% for category in site.categories %} {% if category[1].size == i %}
    -

    {{ category[0] | capitalize }}

    +

    + {% if category[0].size <= 2 %} + {{ category[0] | upcase }} + {% else %} + {{ category[0] | capitalize }} + {% endif %} +

    {% for post in category.last %} {% include archive-single.html type=entries_layout %} diff --git a/blog/_layouts/category.html b/blog/_layouts/category.html index 2fd1260c..9764e5ee 100644 --- a/blog/_layouts/category.html +++ b/blog/_layouts/category.html @@ -2,7 +2,14 @@ layout: archive-notitle --- -

    {{ page.taxonomy | capitalize }}

    +

    + {% if page.taxonomy.size <= 2 %} + {{ page.taxonomy | upcase }} + {% else %} + {{ page.taxonomy | capitalize }} + {% endif %} +

    + {{ page.taxonomy_description }} {% assign entries_layout = page.entries_layout | default: 'list' %} diff --git a/blog/_pages/category-ai.html b/blog/_pages/category-ai.html new file mode 100644 index 00000000..fd3ebbd8 --- /dev/null +++ b/blog/_pages/category-ai.html @@ -0,0 +1,7 @@ +--- +layout: category +permalink: /category/ai +title: Category +taxonomy: ai +taxonomy_description: Artificial Intelligence and Machine Learning on AKS +--- \ No newline at end of file