Newbie here trying to set up songs website

Hi guys, I’m a newbie to Hugo and it’s still very tricky for me.

I created the html files already and now I’m trying to implement this setup:

content [main page with new songs]

-> top-songs

-> artist
  -> lady-gaga
  -> taylor-swift
    -> of each artist:

    title: "Taylor Swift"
    slug: "/songs/taylor-swift/"
    extrainfo: "American singer"

title: "Shake It Off"
categories: [Taylor Swift]
slug: "/taylor-swift-shake-it-off/"

draft: false
mainwebsitepage: true
date: 2020-03-17T04:05:00Z
lastmod: 2020-03-17T04:05:00Z

youtubeid: "nfWlot6h_JM"

album: "1989"
songwriters: "Taylor Swift, Max Martin and Shellback"

song.html [simplified]

<!DOCTYPE html>
<html lang="en-US">
<title>Taylor Swift - Shake It Off</title>
March 17, 2020
<p>This Taylor Swift song named "Shake It Off" is a track from the album "1989" and written by Taylor Swift, Max Martin and Shellback.</p>
<iframe width="640" height="360" src=""></iframe>

I think “artist” is the taxonomy, the “artist name” the term and the “song” the value.

I’m having a hard time setting this up properly with the right archetypes and config.toml. Also no idea how to set up the files in the “layouts folder” …

I really hope you guys can help me… :slight_smile:

Welcome on the forum! :wave:

Hugo has a ‘lookup order’ (see here) that says which template file from ‘layouts’ is used to render which page.

I understand from your post that you make your own theme? In that case it requires a bit of tweaking and experimentation to figure out what a nice setup for the templates is.

An archetype specifies what information Hugo puts by default in a new file. This makes the ‘right’ archetype very specific to a website. Looking at your post, you probably want to include title, categories, slug (and so on) in your archetype.

Hugo comes by default with good default settings, so often you don’t need to specify a lot of options in config.toml. But this is also something very personal to your website, and really depends on what you want to do and change.

Good luck! :slight_smile:

1 Like

thank you so much!! I’m starting to know it better with trial and error… :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.