summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_layouts/postlist.html6
1 files changed, 2 insertions, 4 deletions
diff --git a/_layouts/postlist.html b/_layouts/postlist.html
index cc344d3..ee9dde6 100644
--- a/_layouts/postlist.html
+++ b/_layouts/postlist.html
@@ -59,11 +59,9 @@ layout: default
<script>
document.addEventListener("DOMContentLoaded", function() {
- {%- assign news_ids = site.data.news | map: 'id' -%}
- {%- assign quot_news = news_ids | join: '", "' -%}
- {%- assign js_news = '"' | append: quot_news | append: '"' %}
+ {%- assign news_ids = site.data.news | map: 'id' | jsonify %}
- const ids = [ {{ js_news }} ];
+ const ids = {{ news_ids }};
for (currId of ids) {
const currentBanner = document.getElementById(currId);
const closeLink = currentBanner.firstElementChild;