_layouts/archive-years.html in jekyll-theme-hamilton-1.4.2 vs _layouts/archive-years.html in jekyll-theme-hamilton-1.4.3

- old
+ new

@@ -31,7 +31,14 @@ <li> <time datetime="{{ page.date | date_to_xmlschema }}">{{ post.date | date: "%Y-%m-%d" }}</time> &raquo; <a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a> </li> {%- endfor -%} </ul> - <a href="#" class="back-to-top">Top &#8648;</a> + <a href="#" onclick="backToTop()" class="back-to-top">Top &#8648;</a> {%- endfor -%} + +<script> + function backToTop() { + const main = document.getElementById("site-main"); + main.scrollTop = 0; + } +</script>