Introduce parameter to exclude site title from the Title attribute
In one of my website, I would like to remove the site title from the HTML title element without overriding head.html file. This PR allows to do that by just adding excludeSiteTitle = true in the params settings.
I think there was a discussion about this (or something very similar) somewhere in the past, and the conclusion was that this can be achieved from the project CSS. (By setting navbar-brand__name to display: none)
@fekete-robert I am talking about HTML <title> tag which is displayed at the top bar of the browser and I don't think that there is anyway to use CSS on that. Secondly, I don't want to hide the title, I just want to remove the site title from the <title> tag which is added by Docsy.
Sorry, I misunderstood, my bad.
@chalin Please take a look of this PR.
@fekete-robert @chalin Just wanted to nudge about the PR. Any chance we can get it merged soon?
Hello,
The <title> element in the HTML seems reasonable and no harm. So I'm wondering in what situation we'll need to remove it from a page's HTML?
I mean, do we really need a new parameter just to hide the <title> element in HTML?
@huanlin I am not saying to remove/hide title element in HTML. I am just saying to introduce an option to remove site title/name from the title element in HTML.
Example of title element with site title/name:
<title>Use Docsy as a Hugo Module | Docsy</title>
Example of title element without site title/name:
<title>Use Docsy as a Hugo Module</title>
My one of the client need this option in Docsy.
Example of
titleelement with site title/name:<title>Use Docsy as a Hugo Module | Docsy</title>Example of
titleelement without site title/name:<title>Use Docsy as a Hugo Module</title>
Ah, I see. Thank you for your explanation. It makes sense to me :)
Just to add one little idea: the name excludeSiteTitle may lead to questions like "What does this parameter do?"
I think it would be better if it has a more intuitive name. For example: noSiteTitleInHtmlTitleElement
I don't know, maybe you can come out a better name.
Just an idea :)
I have no issues in changing the parameter name but I think it is sufficient to understand the purpose of this parameter for the developers.
But I am open to change. Let's wait for others feedback.
@chalin @fekete-robert When can I expect this PR to be merged?