1bl4z3r / hermit-V2

Continuing Hermit's legacy to be minimal and fast theme
https://1bl4z3r.github.io/hermit-V2/
MIT License
101 stars 45 forks source link

Share layouts between different menus #86

Closed v0y4g3r closed 1 month ago

v0y4g3r commented 1 month ago

Hi 👋 I'm considering switching from a self-maintained hermit to hermit-v2. But I have a question:

Suppose I have two menus in hugo.toml:

  [[menu.main]]
    name = "Posts"
    url = "posts/"
    weight = 10

  [[menu.main]]
    name = "Gallery"
    url = "gallery/"
    weight = 15

Can I use the same layout as /posts for those pages in /gallery? If not, is there a way to achieve that effect? I'd be happy to work on it.

1bl4z3r commented 1 month ago

Hi @v0y4g3r,

If I correctly understand your concern, you have two folders, namely posts and gallery in your /content directory; and you want to apply same style in gallery pages as you have in posts... Correct me if I'm wrong.

If it is so, you can have a look this issue. [Question] [How-To] Apply layout to the pages which are not in /content/posts

Please let me know if this solves your Issue, else we can have a look.

v0y4g3r commented 1 month ago

Hi @v0y4g3r,

If I correctly understand your concern, you have two folders, namely posts and gallery in your /content directory; and you want to apply same style in gallery pages as you have in posts... Correct me if I'm wrong.

If it is so, you can have a look this issue. [Question] [How-To] Apply layout to the pages which are not in /content/posts

Please let me know if this solves your Issue, else we can have a look.

Thanks! type: posts in page meta will do the trick