Why Nostr? What is Njump?
2024-11-15 19:03:21

Heather Gray (she/her) on Nostr: I need something like Google translate but WP to Hugo 😄 e.g. if ( is_front_page() ...

I need something like Google translate but WP to Hugo 😄

e.g. if ( is_front_page() ) → {{ if .IsHome }}

Great! So what is:

is_page() ??

Well, I got it working with {{ if eq .RelPermalink "/permalink/" }}

But it was tricky to figure out how to even search for it and most of the search results were for checking for the Home page -- which is different.

I never found answer, but got there from reading the Page methods and changing how I thought about things

https://gohugo.io/methods/page/

#Hugo
Author Public Key
npub1vrv33wr9vs6k7jv78ww4r5rvatymwwvpqxgncxgl04vknm63cfnskrv8w8