Blog

A Pair of Problems

7/22/2020

  1. createdAt and updatedAt are not useful in their current form.
  2. It seems we can't include a . in content slugs.

Number 1 has been easily resolved by adding a publishedAt to every content entry. It's just as easy to use for fetching and display, but is tedious to properly maintain. It would be better if, and I don't know how possible this might be, Nuxt Content could support use of a git-based createdAt, meaning: optionally use the date that the content was committed to the repo instead of the date of file creation, as the latter will vary with being copied between machines but the git value should always remain the same. Hugo is capable of this.

Number 2... I really would like to use periods in some content slugs. I might look into writing a custom nuxt generate configuration to see if this can be resolved that way.

It cannot.

That's fine, it just guides me toward the conclusion that a dot in slugs is more trouble than its worth. The problem seems to be that the content module just ignores them, even if I do try to write a custom fetch for nuxt generate. I'd rather stick to using the content module than try something even more drastic, so what I'll probably instead do is... I'll commit to non-use of dots in slugs and project names. 'thombruce.com' is therefore now 'thombruce' instead, and I might change this on GitHub too. If more specificity were necessary, 'thombruce-blog' or 'thombruce-site' would do, right? And when it comes to other projects, and their client-facing websites... We'll avoid names like helvellyn.js and instead go for, like, helvellyn-js and helvellyn-rb, and then a website that documents such a project could be helvellyn-docs, helvellyn-site or... maybe helvellyn-www? Since, y'know, it is its main and root homepage on the world wide web.

Maybe thombruce.com should be thombruce-www, then? I mean rather than just thombruce... I am definitely overthinking this.

Consider Helvellyn, where the naked form helvellyn would be the main app, the main project that gets built and distributed. In that case, absolutely the core app gets named with the naked form. But what about my personal website? There's not going to be a "Thom Bruce app"; surely my main online presence will be thombruce.com, hence the naked form thombruce should be used there? Or... do I commit to a certain pattern where any website is denoted with a -www or -site extension?

Again, yes, I'm totally overthinking it.

I'm gonna stick with the name thombruce.com on GitHub, because it serves as a perfect description. A website is really just one small facet of a project, and locally on this site I will be listing not all individual repos but their broader "projects", sooooo... thombruce is the local name for the project, I'd say. The "me" project; any apps and websites that are about myself.

Makes sense. It's a comfortable resolution to the "I can't use dots" problem that I've now rambled through arguably in too much detail.

So number one is loosely resolved... maybe look for better solutions in the future. And number two, my mind is now settled.

Onwards to other things!