It's been about a year and a half since I've made a change to this website. I'm not sure how much traffic it gets or who takes the time to read these posts. But I like to post a little update any time I make changes to the site.
This one was fairly small, it involves a simple change from hugo templating to raw HTML/Javascript. As you may have noticed, there is a date displayed in the header of the home page. Previously I was using hugo's now
variable to format that date, which displays correctly when the site server is running locally in my laptop. However, when deployed on netlify, now
stays frozen at the time it was built. So, a simple fix is to use the Date
class built into most modern browsers.
The hugo code
{{ now.Format "January 01, 2006" }}
can simply be replaced with this one-liner to get the date and time straight from the browser.
<script>document.write(new Date().toLocaleDateString("en-US", { year: 'numeric', month: 'long', day: 'numeric' }))</script>
The only other changes to the site in this update were to the homepage and the now-called “posts” page. The homepage is now more succinct and up-to-date, and the “projects” page was renamed to “posts” because it functions more as a blog than a complete overview of my personal projects.