Create pages based on images in the assets directory

Hello everyone, I am currently trying to build a website similar to bootstrap icons for GNOME’s Adwaita icons.
When you use the site, you get as first page a list of the available icons. You can then click on them to display the icon in a full page and how to install it.
To do that, they use .md files and apply a template on them.

I’ve created the template and .md files but now I don’t know how to correctly link them on the first page/ use which method to create a link that takes you from the first page to the icon page.

For previous projects I tried to use the .Site.GetPage method but it doesn’t seem to work here.

here is my code if you want to check it: Making sure you're not a bot!

If this were my site, I would stuff all of the icons somewhere in the assets directory, and then use a content adapter to generate each page on the fly.

Interesting…
Do you have an example i could copy and past… i mean take inspiration? :laughing:

The implementation is trivial. See docs.

git clone --single-branch -b hugo-forum-topic-53956 https://github.com/jmooring/hugo-testing hugo-forum-topic-53956
cd hugo-forum-topic-53956
hugo server

So… I tried yoour example but sadly no icons are shown in the local preview. Is this normal?

You might try clicking on the link that says “Icons”.

woo that’s nice, you have given me the answer i need. Thx!
Last question, which method did U use to link every page in between?

Look at the list template.

in the icons or _default folder?

Irrelevant. Both just range over a page collection.

1 Like

OK. I need to learn about that. Marking your git instructions as solution!
Thx again!

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