I am using a 2nd static dir to store resources like bootstrap/jquery css and js files which can be used conditionally. The purpose is to have 2 different config.toml files, one for local development which uses this local version of the files (staticDir2 is defined with the path), and another config file for the live site which pulls the static resources from official CDNs (the staticDir2 variable is empty or omitted).
Testing on the existence/value of .Site.staticDir2 in the partials does not work:
executing “theme/partials/header.html” at <.Site.staticDir2>: can’t evaluate field StaticDir in type *hugolib.SiteInfo
Is there a way to check on this variable ? For the sake of simplicity of the config file, I’d like to avoid having to define another variable under ‘params’ to identify that staticDir2 is in use, if that is possible.