Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

FEATURE: user-header.js and user-footer.js #250

Open
jacanchaplais opened this issue May 2, 2021 · 2 comments · May be fixed by #253
Open

FEATURE: user-header.js and user-footer.js #250

jacanchaplais opened this issue May 2, 2021 · 2 comments · May be fixed by #253

Comments

@jacanchaplais
Copy link

jacanchaplais commented May 2, 2021

Feature Request

Is your feature request related to a problem?

Netlify authentication for their CMS requires a JS script loaded in <head> of homepage. add-on.js gets loaded in footer, so currently need to override header partial, which may cause downstream problems later.

Solution

Add distinct options for <head> and <body> js files in config.toml.

Alternatives

Could also have a headless CMS provider in config.toml, with several popular options to automatically set up.

Additional comments

I have realised that Netlify itself offers snippet injections, which could solve for this specific use case. Might still be a useful feature in general, so postprocessing or layout tampering isn't needed.

Also, I really like this theme, thank you for your work on it.

Edit: factual corrections, additional comments

@pacollins
Copy link
Owner

I think this would be a great extension of #178 which I'm working on right now.

Maybe a user-header.js and user-footer.js and move away from add-on.js as we move away from add-on.css?

Thanks for the suggestion!

@jacanchaplais
Copy link
Author

Sounds ideal, I would also be very pleased for SCSS integration rather than CSS.

@pacollins pacollins changed the title FEATURE: load JS file in <head> for Netlify CMS FEATURE: user-header.js and user-footer.js May 6, 2021
@pacollins pacollins linked a pull request May 8, 2021 that will close this issue
2 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants