A person writing with a blue mechanical pencil wearing a long sleeve light brown and gray shirt or sweater. Only a bit of sleeve is visible. A notebook and coffee mug are in the background.

Post Template

Implementation

Given all the thoughts below, it seemed like a single template would work. Currently, there is one called blog-post. Perhaps it could be called single-post in preparation for having all-posts (paged layout) later.

  • rename: blog-post.js to single-post.js

Wow, quickest, smallest commit in the whole thing! Probably what most commits should be!

Front Matter Updates

  • Added implementation, created, and createdCirca frontmatter for date information
  • Added some info to the PostTemplate to use this new frontmatter
    • Left Posted: {date}
    • Center: {time to read}
    • Right: Implemented: {implementation} | Written on: {created} | Written during: {createdCirca}

This is all easily visible on every post.

Updates on cover images

  • At this point, the images were not as crisp as wanted them to me. I tried setting picture quality to 100 but that did not work.
  • I changed coverImage to auto-size (instead of less tall) when screen is smaller. That looks better to me.
Attributions

Photo by Visual Stories || Green Chameleon (@craftedbygc) on Unsplash

Thoughts on Templates and Front Matter

The three Templates for my site are:

  • blog
  • site
  • project

tl;dr: All of these look about the same and I only need one template!

Template Differences

  • Site can have an implementation date
  • Projects can have a created date, circa date, or date range
  • Each one should have its own default coverImage

Front Matter

I went through each type of post and made a list of required front matter. My original idea was each type of post would be different enough to warrant its own template but really, what's going to be that different?

FieldTypeOptionalComments
titletextNo
slugtextNo
datedateNo
featuredintYesWill display on main page if featured
coverImagetextYesPath to coverImage, uses default if none specified
excerpttextYesWill use default if not specified
tagsarray[text]Yes
implementationdateYesOnly for Site
createdCircatextYesOnly for projects. Circa created/composed date, could be date range
createddateYesWhen you know the date. Should override createdCirca
updateddateYesInclude if post is ever updated (just the latest)

Other ideas that I threw away. These can all be done with tags!

  • Music: style
  • Music: instrumentation (tag featured instrument if there is one otherwise, big band, wind band, etc.)
  • Non-Music Project: Area
Built with Gatsby from 2020 thru 2024 (and beyond?!)