It was January 2020 when I first shared my sunrise project and the custom Hugo build. That January I had just completed watching and photographing every sunrise of 2019.
Little did I know then, that I wouldn’t stop, and that I’m slowly working on publishing 1,500+ consecutive sunrises to the website.
The entire project lives here yearofthesunrise.com
Ask me anything!
It’s been a massive undertaking from a development standpoint alone, and I’d love to answer any questions anyone has from what I’ve learned over the last three years of using Hugo for what’s become a pretty large site.
As of the latest build there are 1,822 pages generated.
Pages | 1822 |
Paginator pages | 35 |
Non-page files | 0 |
Static files | 66 |
Processed images | 0 |
Aliases | 159 |
Sitemaps | 1 |
Cleaned | 0 |
As of the latest build, I am using Hugo v0.110.0.
Locally, my build time is about 27 seconds.
Build time on Netlify is about 14 seconds with a roughly 2.5 minute total deploy time.
To date, I have only published 567 of the 1,461 sunrises, meaning the total build time and page count will continue to grow quite significantly.
Hugo Lessons and struggles
I’ve gotten to know Hugo very well now, but with any platform, there have been some headaches and learning curves along the way. These have been some of the biggest learning curves and challenges.
- Learning and understanding more advanced
where
filters has been a headache, yet so powerful as I’ve learned more along the way. - Understanding of partials has also been a pain point, especially as it pertains to passing variables and context. However, once I learned I could use
return
in a partial, this simplified a lot of existing code and replace a lot of duplicate code. - The flexibility of the layout lookup order has been incredible, however has felt a little convoluted at times to figure out which file to create where.
- Output Formats have been a really wonderful tool to use, I use them to display different layouts for each sunrise and each year (such as a dedicated page for purchasing prints, and different archival views). Understanding the lookup order and settings of Output Formats has been an ocassional pain point, but once again has proven the flexibility of Hugo.
- There are still countless Hugo features I have not used, from modules, to image processing, and others.
In short, master the layout lookup order and the where filters if you’re handling lots of content in multiple places. These are just a few short notes, but as always, read the docs!
Notes of interest
In the last three years, the appearance of the site is very similar. The biggest challenge as the project evolved into a second, third, and fourth year, was to update the theme to handle multiple years when it was originally meant to handle a single year. This required quite a bit of work restructuring the content directory.
The “stack” as they say, has remained largely unchanged.
- Images are hosted on Flickr, this is due to the simply integration from editing and publishing photos from Lightroom
- Image loading and processing is managed through IMGIX, the most important reason being able to handle multiple image sizes from one source image. However, I have a lot of fun using meta data to add text overlays to the image as well as providing print and frame mockups.
- Snipcart is used as my headless e-commerce solution.
- Google Maps is used to map all the photos. I would like to investigate other solutions, but I know the Google Maps JS API well and it’s the quickest solution to getting this project into the world for now.
- As of this week I replaced the DarkSky API with Visual Crossing. There have been some benefits as I think I’m now pulling more accurate weather data for each sunrise.
- I recently made the switch from Atom to VS Code. It’s been a welcome change, but still struggling with some of my old keyboard shortcuts that were long memorized.
Praise for Hugo
I love Hugo. Big, big fan! It’s been an awesome solution to build this project out and I’m grateful for everyone contributing to it. Thank you!
It provides just about everything I need, the biggest wish I had was the ability to build from a remote content source (as many of you know this has been a long requested feature, and I understand the complexities of it, etc).
Being the fan that I am, I wanted to give an update on this project and show others what’s possible using Hugo.
Certainly this is a very unique build specific to this project. but I would love to hear any questions about my decision making, how I solve X, Y or Z, what problems I’ve encountered, and maybe I’ll keep learning along the way how I can build out the site a little more efficiently.
If you made it this far, thanks for reading! #WatchMoreSunrises