Creation: February 6, 2019
Updated: February 17, 2019
David at Blot graciously wrote this script for me to only show the date once in the Console template even when multiple posts are created in the same day.
var dates = document.querySelectorAll(‘.light.margin.left’);
`if (date.innerHTML === lastDateInnerHTML) date.style.display = ‘none’;` `lastDateInnerHTML = date.innerHTML;`
You’ll see I’m using the metadata “micro” here. So all of my Microposts (w/o title) contain “Micro: yes” at the top. Regular posts do not include this at all.
I was told the same thing can be done with %5Etitle for posts without titles and %23title for posts with titles. This is probably a simpler way to handle it and avoid having to deal with extra metadata in your files, but I wasn’t able to get it to work.
`%23entries` `<span class="light margin left">date</span>` `%5Emetadata.micro` `<p>` `<a class="entryblocktitle" href="url">title</a>` `</p>` `/metadata.micro` `%23metadata.micro` `<p class="entryblock">%7Bhtml}</p>` `/metadata.micro` `/entries`