summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruvok cheetah2025-03-04 18:13:07 +0100
committeruvok cheetah2025-03-04 18:13:07 +0100
commitfcca46593170a5067eb6d2b18a0a83769e253bf8 (patch)
tree8281b163c88e4343667ea32f5d2d5327f7b933e2
parent97b387e70f3e42a123b8149a63554fc7d79d28a2 (diff)
Fix renamed id, let generate automatically
-rw-r--r--_layouts/postlist.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/_layouts/postlist.html b/_layouts/postlist.html
index 52d07df..cc344d3 100644
--- a/_layouts/postlist.html
+++ b/_layouts/postlist.html
@@ -59,7 +59,11 @@ layout: default
<script>
document.addEventListener("DOMContentLoaded", function() {
- const ids = [ "AdBlock", "news1" ];
+ {%- assign news_ids = site.data.news | map: 'id' -%}
+ {%- assign quot_news = news_ids | join: '", "' -%}
+ {%- assign js_news = '"' | append: quot_news | append: '"' %}
+
+ const ids = [ {{ js_news }} ];
for (currId of ids) {
const currentBanner = document.getElementById(currId);
const closeLink = currentBanner.firstElementChild;