mremond
February 23, 2023, 9:31am
1
I would like to avoid showing the year in the list of articles and show the year as a title. So it is like group the article by year and having an section in between groups.
Is there a way to do that with handlebar, currently ?
Thanks !
@mremond here are a couple of tutorials on creating Archive pages…
Archive.js
$(document).ready(function(){
if($('#archivePage').length){
var $item = $('.archiveList--item'),
dates = {};
$item.each(function(){
dates[$(this).data('date')] = '';
});
for (date in dates) {
This file has been truncated. show original
page-timeline.hbs
{{!< default}}
{{!-- This is a page template. A page outputs content just like any other post, and has all the same
attributes by default, but you can also customise it to behave differently if you prefer. --}}
{{!-- Everything inside the #post tags pulls data from the page --}}
{{#post}}
<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}">
<nav class="main-nav {{#if image}}overlay{{/if}} clearfix">
This file has been truncated. show original