From d322acaafebf06fd0a4f91985a590473b77b419c Mon Sep 17 00:00:00 2001 From: david-swift Date: Tue, 11 Mar 2025 21:00:46 +0100 Subject: [PATCH] Add option to hide number of subprojects --- config.toml | 3 +++ templates/subproject_list.html | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 8cc24de..a4caa99 100644 --- a/config.toml +++ b/config.toml @@ -107,6 +107,9 @@ show_backlinks = true # Custom separator used in title tag and posts metadata. # title_separator = "-" # +# Hide the number of subprojects in the subprojects list. +# hide_number_of_subprojects = true +# # Whether to use Content Security Policy. # Keep in mind that although this can potentially increase security, # it can break some stuff, in which case you will need to set custom policy. diff --git a/templates/subproject_list.html b/templates/subproject_list.html index 21f1278..523eeaf 100644 --- a/templates/subproject_list.html +++ b/templates/subproject_list.html @@ -35,8 +35,10 @@ {{ macros_translate::translate(key="filter_by_tag", default="Filter by tag", language_strings=language_strings) }}
- {%- endif %} - {{ macros_translate::translate(key="posts", number=number_of_posts, default="$NUMBER posts in total", language_strings=language_strings) }} + {%- endif -%} + {%- if not config.extra.hide_number_of_subprojects -%} + {{ macros_translate::translate(key="posts", number=number_of_posts, default="$NUMBER posts in total", language_strings=language_strings) }} + {%- endif -%}