In this post we will create a template for single blog posts on our Hugo blog. The end result will be a clean and simple page with support for a featured image. It will also show the author, an author image, publish date and the estimated reading time.
Last time we finally started creating our own theme and we were able to render something on the home page. We also created a template for the page head so that our pages will always contain the necessary metadata and information for social sharing. Next we're going to create the basic layout for our page.
Now that we know how the basics of Hugo it's time to take a step further and start building our own theme. This post will lay the foundations for our theme so it won't look like much in the beginning but it will be something that we can build on. We have lots of content to cover so let's get going!
All you need to know to commitJanne Kemppainen |
Have you ever typed
git commit without
-m and felt powerless after being trapped inside of Vim (or Vi) with no way out? I'm here to help you!
I've been there and I remember searching for how to exit Vim without even considering the option to actually learn to use it. After finally taking the time to learn the Vim keybindings I'm now using them in other applications too!
In the last post of the series we touched the surface and learned what Hugo is. This time we will dive deeper and actually create our first example site with a ready theme.
An Introduction to the 'Blog with Hugo' seriesJanne Kemppainen |
I wanted to have a blog where I could share my thoughts and ideas. Naturally I quickly discovered WordPress and started fiddling around with it. In this series I'll tell you why I chose to go with a static site generator called Hugo instead and how you can do it too. The idea of this series is to help you learn while doing.
If you want to go the static web page route with Hugo you have basically two choices, either use a ready theme or create your own. I decided to go with the homebrewn option because I felt that the ready themes didn't match with how I envisioned the site should look.
In this series I am going to show you how to start a theme from scratch. But if you want to go with a ready theme I still recommend that you read through these pages as they'll help you understand how Hugo works and hopefully help you customize your site.
I want you to have the resource that I would've needed when starting out.