Hello!
I'm adding some basic analytics to my website, and this requires adding a couple lines of html in every page. Sadly there's not an easy way to do it in Jekyll or Chulapa. My solution was creating a new version of each of Chulapa's layouts, where each new layout adds these lines of code and then "delegates" the rest to the base layout.
To allow users to add some code in all the pages, I think a better approach would be to add an "injection point", somewhere to put their code so that it appears everywhere. For example, the minimal layout could import a "custom_code.html" include file that is empty by default, but that the user can override by putting their own version in their "_includes" folder.
I think this could be useful for everyone, let me know what you think!
Hello!
I'm adding some basic analytics to my website, and this requires adding a couple lines of html in every page. Sadly there's not an easy way to do it in Jekyll or Chulapa. My solution was creating a new version of each of Chulapa's layouts, where each new layout adds these lines of code and then "delegates" the rest to the base layout.
To allow users to add some code in all the pages, I think a better approach would be to add an "injection point", somewhere to put their code so that it appears everywhere. For example, the minimal layout could import a "custom_code.html" include file that is empty by default, but that the user can override by putting their own version in their "_includes" folder.
I think this could be useful for everyone, let me know what you think!