-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a placeholder to inject tags into <head> #345
Comments
I am against empty partials. Yes, other themes use them, but it doesn't seem preferable. We need to look at other solutions: it could be a block, putting the head below the title in a separate partial, or something else. I can say for sure that an empty partial solution does not seem sensible.
Speaking of analytics, why not just override the Choosing the right way requires careful consideration. It does not seem sensible to use an empty partial. Rewriting one of the internal templates is suggested as a quick solution. |
I don't understand your reluctance to have deliberate seams in a template so your users can adapt it to their needs. Your counter is to override completely inappropriate templates, which you admit is a hack. I am currently overriding the Twitter template to inject HTML tags, which we both agree is a terrible idea but is the only option you are giving me. Please rethink your arbitrary view on placeholder partials for customising content, which is the entire point of user overrides. In the meantime I am left with two options:
Or of course 3, use a different template, which I would rather not do! Thanks, |
I never said that. For me, as a maintainer, an empty layout file as a head section extender is also a sub-optimal solution. I've also suggested two alternatives, but this is not an exhaustive list. Ideally, the plan is to complete a list, experiment, and then choose the one solution that suits best. And just as a quick solution, as clearly mentioned at the end of the previous comment, I suggested overriding the internal template.
Again, I never said that. And file selection is important. The |
I don't understand what is "suboptimal" about having clearly signposted places for your users to customise key parts of an HTML page, using an idiom that is common in other Hugo templates. Still, I'm not going to argue, it's your template and you don't want to provide a common facility that your users will find useful. I think it is great that you are doing the work to create a template in the first place. I will look for another template that makes this easier for me, which is a shame because really like your widgets idea. |
I have two use cases for meta tags:
<meta name="robots" content="noindex,nofollow">
<script src="https://cdn.usefathom.com/script.js" ...></script>
The simplest solution would be to have something like an empty
partials/custom-head.html
that the theme invokes in the<head>
part of the_default/baseof.html
template.Some themes put placeholders everywhere, which provides a clean way to customise the theme without having to copy and edit the whole
baseof.html
, which might change dramatically between versions of the theme.I am happy to roll a PR if you are interested.
The text was updated successfully, but these errors were encountered: