Right now I am putting it in front matter as:
—
Title: Example
Link1URL: http://google.com
Link1Name: Google
Link2URL: http://youtube.com
Link2Name: Youtube
—
Then I am hard coding about 10 of these into a “sidebar.html” partial. This isn’t very programmy, so I figured I’d poke yall’s brains a bit.
I have not tried it, but you’d likely put the “related” partial that page mentions in your sidebar.
Also, it appears it’s relating by keywords, author, etc., so I assume that pages with the same keyword etc, would be indexed when Hugo builds, and thus appear in the list.
Thanks for the starting point Rick! Helpful stuff because I didn’t know about it. However, my “related content” would mostly be external.
For instance, this particular site deals with international students admissions, and a “related link” would be something like a student visa form page on a .gov site.
Ideally I would like to create some sort of array that contains both link urls and link text, then that sidebar just loops through the manually entered array.
I mean, it’s easy enough to stick them in frontmatter, but, I’d say you could get some benefit from making an array in a data file, especially if you need to link multiple pages to the same external site.