Ordinarily, as in this shortcode, the below works fine for computing a certain path:
{{- $rootDir := $.Get "rootDir" | default (print "/content/" .Page.File.Dir) }}
However, on a windows machine (Hugo Static Site Generator v0.72.0/extended windows/amd64 BuildDate: unknown), we have the following config for which the above fails on use with readDir (error calling readDir: failed to read directory "/content/sAma\\meta\\paravastu-sampradAyaH\\images\\."
):
[[module.mounts]]
source = "../vedAH-content"
target = "content"
How would I avoid hardcoding /content/
? I tried looking at Site Variables | Hugo and did not notice any variable which will give me the path to the content directory. I want to avoid doing something ugly like passing it in .Site.Params. Any ideas?