(Note: This is about Hugo variables, but on a hosted blogging site I do not have access to except as a user. I’m hoping this particular question has enough of a hook into the general case that the specifics of that blog system won’t matter, but you never know.)
The output of the above on, e.g. a photos page, is:
&
hugolib.PageOutput {
Page: ( * hugolib.Page)(0xc000d22000),
paginator: ( * hugolib.Pager)(0xc000b5cc00),
paginatorInit: sync.Once {
m: sync.Mutex {
state: 0,
sema: 0x0
},
done: 0x0
},
resources: resource.Resources {},
resourcesInit: sync.Once {
m: sync.Mutex {
state: 0,
sema: 0x0
},
done: 0x1
},
targetPathDescriptor: hugolib.targetPathDescriptor {
PathSpec: ( * helpers.PathSpec)(0xc0004a1380),
Type: output.Format {
Name: "photoshtml",
MediaType: media.Type {
MainType: "text",
SubType: "html",
mimeSuffix: "",
Delimiter: ".",
Suffixes: [] string {
"html"
},
fileSuffix: ""
},
Path: "photos",
BaseName: "index",
Rel: "alternate",
Protocol: "",
IsPlainText: false,
IsHTML: false,
NoUgly: false,
NotAlternative: true
},
Kind: "home",
Sections: [] string(nil),
BaseName: "",
Dir: "",
LangPrefix: "",
IsMultihost: false,
URL: "",
Addends: "",
ExpandedPermalink: "",
UglyURLs: false
},
outputFormat: output.Format {
Name: "photoshtml",
MediaType: media.Type {
MainType: "text",
SubType: "html",
mimeSuffix: "",
Delimiter: ".",
Suffixes: [] string {
"html"
},
fileSuffix: ""
},
Path: "photos",
BaseName: "index",
Rel: "alternate",
Protocol: "",
IsPlainText: false,
IsHTML: false,
NoUgly: false,
NotAlternative: true
}
}
Is there no way to grab that Path”photos"
for use in an if eq
?
(The system in question is still on 0.53 and is working toward upgrade.)
Thanks.