Add ability to insert custom code into the global <head>.#17
Conversation
alanorth
left a comment
There was a problem hiding this comment.
Brilliant and simple. Minor changes requested.
| {{ partial "cookie-consent.html" . }} | ||
| {{ end }} | ||
|
|
||
| {{ partial "head-custom.html" . }} |
There was a problem hiding this comment.
Spacing here should be like the surrounding text: four spaces, not two tabs.
There was a problem hiding this comment.
Nice change! I had the need too but did simply override cookie_consent.html. (It's changed anyway, so it was no problem for me).
There was a problem hiding this comment.
Woops. Looks like vim decided to use tabs to indent and I forgot to check. Do you mind if I add a modeline comment to the bottom of the file while I'm at it?
There was a problem hiding this comment.
Let's stick to one logical change for each commit / pull request — you can add modelines to ALL the files in a separate pull request. ;)
Also, in the future it would be better for the GitHub workflow if you committed your changes to a feature branch like custom-head-code or something. Your master should theoretically always match the upstream one (mine).
| {{ partial "cookie-consent.html" . }} | ||
| {{ end }} | ||
|
|
||
| {{ partial "head-custom.html" . }} |
There was a problem hiding this comment.
Let's stick to one logical change for each commit / pull request — you can add modelines to ALL the files in a separate pull request. ;)
Also, in the future it would be better for the GitHub workflow if you committed your changes to a feature branch like custom-head-code or something. Your master should theoretically always match the upstream one (mine).
The change is pretty simple. I wanted to put some custom JavaScript in the <head> of a site I'm building, but I didn't want to have to edit the theme or make a copy of
layouts/_default/baseof.html, since later changes to the theme may break it. This change allows code to be insterted into <head> by creating alayouts/partial/head-custom.html.