Open hayleyw7 opened 3 months ago
The simplest approach that I can think of right now is to place the theme and analytic scripts into all pages then only apply other scripts on a per-page basis. I've assembled the layouts and partials to use liquid templates so we can conditionally add scripts in any place based on some frontmatter property. I am thinking of probably a script: ["script1-name", "script2-name"]
approach in the frontmatter of each page. The template then can conditionally add in scripts whether it's mentioned in the frontmatter.
We should probably brainstorm a bit on how we do this. There are a lot of different ways.