docsy icon indicating copy to clipboard operation
docsy copied to clipboard

feat: Expose cdn settings as params

Open bradbeam opened this issue 2 years ago • 6 comments

This moves the configuration of much of the cdn (js/css) into the configuration so they can be more easily maintained.

Signed-off-by: Brad Beam [email protected]

bradbeam avatar Aug 29 '22 17:08 bradbeam

Thanks for this! This is a potentially interesting approach (especially as we have some users who don't necessarily want to use our chosen CDNs), but is presumably going to break any site that doesn't update their config.toml/yaml

Thoughts @chalin @geriom @emckean?

LisaFC avatar Sep 05 '22 14:09 LisaFC

Maybe we could use the default function of hugo, and use the config parameters if set, or use the original cdns if not.

fekete-robert avatar Sep 05 '22 14:09 fekete-robert

I'll have a look at how the scripts partial would look if we used defaults.

LisaFC avatar Sep 13 '22 09:09 LisaFC

Sorry for the delay, I just pushed up changes to include defaults inside the templates.

bradbeam avatar Sep 14 '22 02:09 bradbeam

This moves the configuration of much of the cdn (js/css) into the configuration so they can be more easily maintained.

I like the idea. This PR does not pull in the latest versions of the resources, however (e.g. it pulls in KaTeX 0.15.1, while latest version is 0.16.2.) Were great if this could be improved.

deining avatar Oct 05 '22 13:10 deining

I wanted to keep the scope of the change as minimal as possible. I think version bumps can be done as followups to this.

bradbeam avatar Oct 05 '22 14:10 bradbeam