From 5e0ecedb3f86d5c423b4f405cf0f2f6570b71b1c Mon Sep 17 00:00:00 2001 From: Kumi Date: Sun, 7 Jan 2024 11:27:30 +0100 Subject: [PATCH] Implement service index exclusion control Reworked service configuration to allow individual services to be conditionally excluded from the main index, increasing the flexibility of the display. Configuration files have been restructured and moved into appropriate subdirectories to improve project organization. - Added `exclude_from_index` flags to all services within `services.json` to facilitate granular control over their visibility on the index page. - Modified the `index.html` template to respect the new `exclude_from_index` setting, thus excluding specified services from being listed on the index page. - Migrated `Caddyfile` and `privatecoffee.ini` to `contrib` directory for better separation of project contributions and core configuration files. This update enhances the site's privacy features and enables easier navigation by allowing selective service display. --- Caddyfile => contrib/caddy/Caddyfile | 0 .../uwsgi/privatecoffee.ini | 0 services.json | 32 ++++++++++++++++++- templates/index.html | 2 ++ 4 files changed, 33 insertions(+), 1 deletion(-) rename Caddyfile => contrib/caddy/Caddyfile (100%) rename privatecoffee.ini => contrib/uwsgi/privatecoffee.ini (100%) diff --git a/Caddyfile b/contrib/caddy/Caddyfile similarity index 100% rename from Caddyfile rename to contrib/caddy/Caddyfile diff --git a/privatecoffee.ini b/contrib/uwsgi/privatecoffee.ini similarity index 100% rename from privatecoffee.ini rename to contrib/uwsgi/privatecoffee.ini diff --git a/services.json b/services.json index faec9ec..b459310 100644 --- a/services.json +++ b/services.json @@ -12,6 +12,7 @@ "url": "https://element.private.coffee" } ], + "exclude_from_index": false, "exclude_from_simple": true }, { @@ -26,6 +27,7 @@ "url": "https://cryptpad.private.coffee" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -40,6 +42,7 @@ "url": "https://invidious.private.coffee" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -58,6 +61,7 @@ "url": "https://skrt.social" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -72,6 +76,7 @@ "url": "https://gothub.private.coffee" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -86,7 +91,8 @@ "url": "https://redlib.private.coffee" } ], - "exclude_from_simple": true + "exclude_from_index": false, + "exclude_from_simple": false }, { "name": "AllTube", @@ -100,6 +106,7 @@ "url": "https://alltube.private.coffee" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -114,6 +121,7 @@ "url": "https://indestructables.private.coffee" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -128,6 +136,7 @@ "url": "https://nocodb.private.coffee" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -142,6 +151,7 @@ "url": "https://penpot.private.coffee" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -156,6 +166,7 @@ "url": "https://private.cf" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -170,6 +181,7 @@ "url": "https://rallly.private.coffee" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -184,6 +196,7 @@ "url": "https://librey.private.coffee" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -198,6 +211,7 @@ "url": "https://overleaf.private.coffee" } ], + "exclude_from_index": false, "exclude_from_simple": false }, { @@ -218,6 +232,22 @@ ] } ], + "exclude_from_index": true, + "exclude_from_simple": true + }, + { + "name": "Proxigram", + "url": "https://proxigram.private.coffee", + "short_description": "Proxigram is a privacy-friendly alternative front-end to Instagram.", + "long_description": "Proxigram is a privacy-friendly alternative front-end to Instagram. It allows you to browse Instagram without being tracked.", + "status": "NOK", + "links": [ + { + "name": "Go to Proxigram", + "url": "https://proxigram.private.coffee" + } + ], + "exclude_from_index": true, "exclude_from_simple": true } ] diff --git a/templates/index.html b/templates/index.html index 276e47e..f24c0da 100644 --- a/templates/index.html +++ b/templates/index.html @@ -13,6 +13,7 @@
{% for service in services.services %} + {% if not service.exclude_from_index %}

{{ service.name }}

@@ -55,6 +56,7 @@

{% endfor %}
+ {% endif %} {% endfor %}