From 9453ddefe831f37e7abfc962362b5ced91de53ac Mon Sep 17 00:00:00 2001 From: nkapila6 <12816113+nkapila6@users.noreply.github.com> Date: Tue, 13 Aug 2024 16:23:29 +0400 Subject: [PATCH 1/3] feat: added new tags section ci: added tags in yml feat: new tags layout ci: update yml feat: update index to include a tags section feat: new tags page added amend: disable tag sections (default) --- _config.yml | 2 ++ layout/index.ejs | 17 +++++++++++++++++ layout/tags.ejs | 26 ++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 layout/tags.ejs diff --git a/_config.yml b/_config.yml index 6cf87edc..906b41e8 100644 --- a/_config.yml +++ b/_config.yml @@ -19,6 +19,8 @@ nav: articles: /archives/ projects: http://github.com/probberechts +# Show a Tags section on the home page +show_tags_section: false # Links to your social media accounts. # The 'icon' keys should correspond to Fontawesome icon names diff --git a/layout/index.ejs b/layout/index.ejs index f2a38194..568705d0 100644 --- a/layout/index.ejs +++ b/layout/index.ejs @@ -72,3 +72,20 @@ <% } %> + +<% if (theme.show_tags_section) { %> +
+ Tags + <% if (site.tags && site.tags.length > 0) { %> + + <% } else { %> +

No tags found.

+ <% } %> +
+<% } %> diff --git a/layout/tags.ejs b/layout/tags.ejs new file mode 100644 index 00000000..9a3e96e8 --- /dev/null +++ b/layout/tags.ejs @@ -0,0 +1,26 @@ +<%- partial('_partial/head') %> +
+
+ Tags + a category wise display of posts + <% if (site.tags && site.tags.length > 0) { %> + + <% } else { %> +

No tags found.

+ <% } %> +
+
+<%- partial('_partial/footer') %> \ No newline at end of file From e79cdd229bfded0e0586966989357ae77db4a822 Mon Sep 17 00:00:00 2001 From: nkapila6 <12816113+nkapila6@users.noreply.github.com> Date: Tue, 13 Aug 2024 17:13:15 +0400 Subject: [PATCH 2/3] feat: added new category section --- _config.yml | 5 ++++- layout/categories.ejs | 26 ++++++++++++++++++++++++++ layout/index.ejs | 17 +++++++++++++++++ layout/tags.ejs | 2 +- 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 layout/categories.ejs diff --git a/_config.yml b/_config.yml index 906b41e8..69dbb65c 100644 --- a/_config.yml +++ b/_config.yml @@ -20,7 +20,10 @@ nav: projects: http://github.com/probberechts # Show a Tags section on the home page -show_tags_section: false +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') %> +
+
+ Categories + a category wise display of posts + <% if (site.categories && site.categories.length > 0) { %> + + <% } else { %> +

No categories found.

+ <% } %> +
+
+<%- partial('_partial/footer') %> \ No newline at end of file diff --git a/layout/index.ejs b/layout/index.ejs index 568705d0..87042492 100644 --- a/layout/index.ejs +++ b/layout/index.ejs @@ -89,3 +89,20 @@ <% } %> <% } %> + +<% if (theme.show_category_section) { %> +
+ Categories + <% if (site.categories && site.categories.length > 0) { %> + + <% } else { %> +

No categories found.

+ <% } %> +
+ <% } %> \ No newline at end of file diff --git a/layout/tags.ejs b/layout/tags.ejs index 9a3e96e8..b4fe516f 100644 --- a/layout/tags.ejs +++ b/layout/tags.ejs @@ -2,7 +2,7 @@
Tags - a category wise display of posts + a tag wise display of posts <% if (site.tags && site.tags.length > 0) { %>