Fonts and Notes _Index | 220922


220922

Local Font Issues Corrected

_0129

After about 3 hours I found what the issue was with the local fonts I was trying to use,

It was a comma at the end of the url part of the @font-face in the css. The editor I was using for this did not throw a syntax error nor did the devtools in chromium. This is due to me removing the the unnecessary parts of the copy pasta’d from the [google fonts help website] (https://google-webfonts-helper.herokuapp.com/), and never noticing it most likely due too the end of line comment explaining what it did. Feel big dumb after this but o well

Where it went wrong

Progression on Notes Bundle Page

Progression

So it doesn’t look like much, but the item I would like to bring attention to is the tags below the project name. It is a collection of the all the tags for a given project. I know that doesn’t really seem to all the complicated, but it ended up being more complex than I though it would be.

View of the code doing this

So with me still learning Hugo, this ending up being kinda of pain.

I will break this down

p1

So In the first loop It just getting the all the project names from the site and Display and “urlize” them. This is down with each of the list pages in each projects sub directory having a front matter param of type populated with project

---
#/ed-m/content/notes/projects/conduit/_index.md
type: project
projectName: conduit
website: <undefined>
...

This is rather simple stuff, but I could get the hugo build into site.sections to work as I wanted as it would only return the top level sections so /notes and /about not the sub directories of notes /projects/ed-m and /projects/conduit. So this work around that I ready knew how put it. I’d like to keep the front matter on projects to a limit cause I know I am going to forget to include it when the times comes down the road, but I think this code will break and Hugo mite yell at me so this more a note to future me.

Tags Part

Continuing on with in the loop while I still have the all project names them self being pulled dymanticly upon build. I use them to match with the all the pages in the site that have the matching project name in the project field of the front matter for each note.

---
#/ed-m/content/notes/projects/conduit/220825.md
title: 220826

subtitle: Getting Local DNS configed with Minikube

date: 2022-08-25T08:58:18-04:00

project: conduit
...

Now that I have each pages of the given project name I can grab the associated tags for each of them. Add each tag to slice, but before I do that I check to see if it’s already there for the given project if so it is not added to the slice.

Then before moving on to the next project name in the top loop it is displayed and “urlized”.

After have written this it doesn’t seem that complex, but when I was doing this I really did not know how to do it. I was messing with maps, dicts, sections, and few other Hugo functions and variables. In addition to not really find anything on line how to do it. Which I think maybe due to people who want to do this know how to do this while other who don’t are just happy with the just tags being tags for the whole site not a sub sector.