Repository navigation
|
Hi, I would like to create a custom menu on the left side which will list a specific category I want to advertise. I have seen the "Category" filter on the right menu which allow me to filter on a given category, but I would like another display, to mimic the archives page. What I have done so far : I created icon world.svg from https://tablericons.com/, and copy it in assets/icons. Easy.
Is it something easily feasible modifying voyages.html (I have no dev skills, but I can edit html), or am I on a wrong way ? |
Replies: 2 comments
|
I think you are going in the right direction. hugo-theme-stack/layouts/archives.html Lines 18 to 19 in 03bf8b0 You should filter $pages based on the category to match your need, and that should do the trick. |
|
Thank you for your answer. I had to ask some help to Mistral AI, because this is a bit above my knowledge, but result is quite good for now. I also change the header section of the voyages.html file to display only the corresponding tile for that category. It also displays the image defined in the category front matter and not the one from the first post from that category. Thank you again ! 👍 |
Thank you for your answer. I had to ask some help to Mistral AI, because this is a bit above my knowledge, but result is quite good for now.
It works with the following filter in place of the default $pages expression :
{{ $pages := where .Site.Pages "Params.categories" "intersect" (slice "Voyage") }}I also change the header section of the voyages.html file to display only the corresponding tile for that category. It also displays the image defined in the category front matter and not the one from the first post from that category.