diff options
Diffstat (limited to '_layouts/postlist.html')
-rw-r--r-- | _layouts/postlist.html | 6 |
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; |