I start a new job @ LaaSie.ai this month (wee excited! 😃) thither they use Vue + Python, both of which I haven't used professionally too much. I figured redoing my blog (this blog... (meta, ik)) would be a gr8 way to Truly Learn.
Cuz I felt like it! (SSGs are cool)
The frontmatter for this post looks like:
The frontmatter for all of my Gatsby blog posts looked like this
I knew I could do a big ole find-n-replace * but I'd always wanted to use
sed and so here's how I did:
sed -E $(whoamijk) -jxPr '' old-blog/src/posts "templateKey" ""
just kidding: I realized soon that I'd dramatized sed (bc of it's combo w/ awk and other pipe-y unix things) and it was the same as using the RE box in VSCode only this time, w/ no gorgina preview:
For the dates I thought of how to find all date occurences `/date.*, destringify them, split it on T for Timezone, and then strip the seconds of the timezone. My mind withstood about 2 minutes of this genre and came up with a much quicker alternative:
In a similar swap from Jekyll -> Gatsby (notice a pattern?) I basically did something of the same with the dates. I also (opinion my won) think that time of publishing down to the second (even day, I'm good with months normally) is silly, but gatsby generated these timestamps automatically when creating a page with netlify's CMS.
So instead, I replaced every date with the same one at the same hour, then went thru (had been looking for an excuse to do this anywho since the jekyll switch) and then approximate at least by the year.
i tried doing this once w/ gatsby using w/ vim using a regex programmatically and then i never tried agian :shrug:
it even handles nested headers
also auto supported ~ i don't really use them a lot but i the fact that i could was cool
see that lil search box in the navbar? i did 0 to make that work
All i did to add the about page was create an
about.md file in the root et vwa-freakin-la. To do so in gatsby is an ordeal in comparaison.
With Gatsby to embed components in md files you had to use MDX which comes w/ its own drama of configuration.
I typed this originally thinking that it couldn't possibly embed my archive component in a blog post (because such is the way of MDX: special pages only) but mashallah with:
<ArchiveList :pages="$site.pages" />
In frontmatter there is a
home: true key that seemingly works like... is this the home page?
I may have been using it for 2 short a time, but I can't really think of anything else?
I took an audit of my gatsby site before I switched and then me VuePress. My Gatsby site (as barebones as they come) scored across the board 80s-90s. Not VuePress. Bro, it was legit 💯 in perf bro:
I'm sure after more fiddling I can get all these numbers up but mighty impressive to come out swingin' with no modifications.
I'm a convert. Clearly ^.^