Mornings200630 | When the mind is fresh.

Fell asleep early last night and woke up at 4am.
Went outside to enjoy the morning air and started working on nchrs.

Executing JS Functions in Eleventy

Found out how to execute arbitrary code with eleventy and added the nchrsDate filter.
It converts the return value of the javascript Date() object to a short handle:

eleventyConfig.addFilter("nchrsDate", function(date) {
  // returns the date as YYMMDD
  const zero = "0"
  const yy = date.getFullYear().toString().slice(2,4)
  let mm = date.getMonth() + 1
  mm = mm < 10 ? zero.concat(mm.toString()) : mm.toString()
  let dd = date.getDate()
  dd = dd < 10 ? zero.concat(dd.toString()) : dd.toString()
  return yy.concat(mm).concat(dd)
});

Templates Progress

I split the base template into three, one containing the base, one for the journals and one for nchrs pages.