It's getting intense

I'm in the deep end for sure now.

So, still on the home stretch as far as I can see but I couldn't really say anymore if this isn't a train of long tail issues and I have no faith anymore I'll be able to go live by today, and I thought it was gonna be yesterday, yesterday.


I figured out the root problem with marked-highlight, and I made a fork with the fix so I can continue onward.

All I need are two things now:

The first one might actually be a big one... See I'm already losing track of stuff, I thought I had markdeep totally licked earlier including with separated rendering... I'm gonna do some git spelunking to confirm I'm not going crazy, because the markdeep output is completely jacked right now.


Got markdeep rendering now, it was just a simple oversight of mine, i was exporting the "inline" conversion function earlier, which of course wasn't including any mathjax or markdown stylesheet content into the HTML output, so of course diagrams and math were all broken. I'm fully aware even with this current state although most math works there is some wonkiness in the rendering. But I am really committed to SSR right now and I have little interest in digging into the particulars of markdeep's MathJax implementation and would want to pursue KaTeX in Marked for any math rendering pursuits for sure.


Home stretch actual

I'm in home stretch actual right about now.

The focus is now on navigation. Although it is easy and tempting to directly build navigation structures in html (as this is considered fairly basic HTML competency after all), one of my goals I hadn't clearly set down earlier in my planning, though I hinted at it, is that I would be authoring pages and laying them out in my git repo and that structure would be automatically replicated in the site, with all necessary navigation elements pre-generated. This to me is a basic blog system UX need, and I'm building a bespoke blog system, so I really couldn't neglect this part. I can do something really basic though because the bulk of the work and fun of a site like this is in the CSS.

Here's what I'm planning for this final step now:


I have now built nav generation. I opted for directly rendering some structure that I think should stand the test of time, though that's certainly questionable:

function buildNav(curriedParent, page, idx, arr) {
  const prev = Math.max(0, idx - 1);
  const next = Math.min(arr.length - 1, idx + 1);
  // console.log('====== nav page:', page.path, `[ ${prev !== idx && arr[prev].path} <-- ]`, `(↑ ${curriedParent.path} ↑)`, `{ --> ${next !== idx && arr[next].path} }`);
  let nav = `<nav><div class="self">${page.path}</div><ul>`;
  if (prev !== idx) nav += `\n<li class="left">${arr[prev].path}</li>`;
  nav += `\n<li class="up">${curriedParent.path}</li>`;
  if (next !== idx) nav += `\n<li class="right">${arr[next].path}</li>`;
  if (page.children) {
    // console.log('---- children nav:', page.children.map(c => c.path));
    nav += `\n<li class="children"><ul>${page.children.map(c => c.path).map(cp => `<li>${cp}</li>`).join('\n')}</ul></li>`;
  }
  nav += `\n</ul></nav>`;
  page.nav = nav;
}