DEV Community

Ray
Ray

Posted on • Edited on

Release 0.2 Week 3

This week I spent about 5 days trying to find the perfect project and issue to help with. I learned quite a valuable lesson about what it means to help other projects and decided to learn something new.

It seems that Hacktoberfest is getting wild. I spent a while trying to find an issue that appealed to me and that I felt was a step up from what I've previously done. Unfortunately, my search was fruitless and I decided instead to dip my toes into Hugo.

The project I decided to work on was a template for a podcast hosting website. Fairly simple and straightforward, like many others of its kind the template is meant to allow developers to quickly build a website meant for hosting podcasts. The issue I took on was a fairly simple one: add some placeholder information and amend it to some shows. AS you can see on the work in progress site, a couple of the podcasts have hosts and little pictures showing them. I wanted to learn how Hugo displays information, generates pages, and how exactly it's meant to be a template.

book-club/_index.md

+++
title = "The Empire Book Club"
description = "Running the Empire is hard work. Sometimes you just need to unwind with a good book."
type = "aggregatedPodcast"
hosts = ["dooku"]
+++
Enter fullscreen mode Exit fullscreen mode

This is how Hugo does things, notice that even though we're meant to display an index page, all we're doing is assigning variables. This is because we're meant to templating.

<div>
    <h1>Welcome to {{ .Site.Title}}</h1>
    <h3>Currently viewing episodes from all {{ with  .OutputFormats.Get "showslist" -}} <a href="{{ .RelPermalink }}">Shows</a>{{- end }}</h3>
</div>
Enter fullscreen mode Exit fullscreen mode

Consider that this page simply renders a page that the information in other folders is slotted into. This is an interesting way of displaying information because it means that we can set variables and use them across the website without having to render them in our code for every new page.

The pull request is located here.

I found the experience of working with Hugo informative if a little confusing. Frankly, I don't think it does a good job of repairing the flaws of other web frameworks. I'm not sure it's meant to. It feels like it's meant to allow non-developers, or developers who are not terribly knowledgable, to build websites that are quick and easy to show the information they'd like. They're static don't forget. I think if one would like to build a robust web app, there's no real reason to use a templating framework like Hugo which, like Angular, is complicated in its file structure (and a little bloated) when you can use React or even vanilla Javascript.

I'm really thankful I got to work with Hugo and this departure from JS was informative, but I think the next project I try to help with will be more in line with what I really want to pursue which is Javascript.

Edit

As of the 31st of October, I've gotten a comment on my pull request which elucidates why I may have jumped the gun on adding to this project.

Oh well...

Oops! Looks like I butted my head in where it doesn't quite belong. That's unfortunate but I still am quite happy with my experience learning a bit about Hugo so I'm not displeased.

Top comments (0)