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
Published at
2024-11-15 19:03:21Event JSON
{
"id": "c18be09f46fc73c962301c85da593f6ce2430cfc9032feb1865dd284b20f0e6d",
"pubkey": "60d918b86564356f499e3b9d51d06ceac9b7398101913c191f7d5969ef51c267",
"created_at": 1731697401,
"kind": 1,
"tags": [
[
"t",
"hugo"
],
[
"proxy",
"https://fosstodon.org/users/treadlightly/statuses/113488520912968384",
"activitypub"
]
],
"content": "I need something like Google translate but WP to Hugo 😄 \n\ne.g. if ( is_front_page() ) → {{ if .IsHome }}\n\nGreat! So what is:\n\nis_page() ?? \n\nWell, I got it working with {{ if eq .RelPermalink \"/permalink/\" }}\n\nBut 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. \n\nI never found answer, but got there from reading the Page methods and changing how I thought about things\n\nhttps://gohugo.io/methods/page/\n\n#Hugo",
"sig": "87bfe8cedc10df708c4f545d4cc8397bb44afc190af674ac6085ea1d3f2f4e6c6b3b2912dc368678e55709991f155af57e5c09ef66820db3d5b7c0a5779e3e7e"
}