Blog Setup

Creation: February 6, 2019
Updated: March 4, 2019

Turning HL into a Personal WebApp

Set Up and Process

Creating Edit Button to Work with Drafts

Coming soon

Posts grouped by date

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.

in script.js

%7BappJS}



var dates = document.querySelectorAll(‘.light.margin.left’);

var lastDateInnerHTML;

dates.forEach(function(date){

 if (date.innerHTML === lastDateInnerHTML) date.style.display = ‘none’;

lastDateInnerHTML = date.innerHTML;

});

Displaying posts without titles

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.

in entries.html

%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

manifestreferenceblogging
edit


Next: To-Do List
Previous: Add to Homescreen

Posts tagged “manifest”

Posts tagged “reference”

Posts tagged “blogging”