Skip to content

Latest commit

 

History

History
49 lines (46 loc) · 1.38 KB

news.md

File metadata and controls

49 lines (46 loc) · 1.38 KB
layout title intro_image intro_image_absolute intro_image_hide_on_mobile
news
News
images/illustrations/robot_news.png
true
false
    <script> var url_tag = new URLSearchParams(window.location.search).get("t"); var div = document.getElementById("filter_by"); var ul = document.getElementById("news_list"); if (url_tag != null) { div.innerText = "Posts with the " + url_tag + " tag"; } else { div.style.display = "none"; } {% for post in site.posts %} var has_tag = false; {% for tag in post.tags %} if (url_tag == null || "{{ tag }}" == url_tag) { has_tag = true; // There should be a {\% break \%} here, but it... breaks js } {% endfor %} if (has_tag) { var li = document.createElement("li"); li.innerHTML = `
    {{ post.title }}
    {% for tag in post.tags %} ♯ {{ tag }} {% endfor %} {{ post.excerpt}}
    `; ul.appendChild(li); } {% endfor %} </script>