Hi, I’m refactoring an old site that’s getting a lot bigger, and hasn’t been touched since Hugo 0.40 days. It doesn’t use data (data/, .Site.Data) at all, but makes heavy use of site-wide params (for config like socal media handles). Which should I favour these days? The docs for each don’t even mention the other.
I get that params is hierachical, looking first in the page’s frontmatter then the site Params.
Params is available as a shortcode, Data isn’t.
Data can fetch over the network, Params is hard-coded.
Should I be using one? The other? Both for different things?
Thanks!
matt
While I’m here, some common site data like Copyright (author, etc) are first-class in the config file, ie a top-level key, and available right at .Site.Copyright. Except… copyright isn’t listed as a config key any more (but isn’t rejected and .Site.Copyright still works). Is this becuase the docs are a bit lacking, or becuase that’s deprecated and I’m meant to use params / data?