Skip to content

Conversation

samiahmedsiddiqui
Copy link
Contributor

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.

@fekete-robert
Copy link
Contributor

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)

@samiahmedsiddiqui
Copy link
Contributor Author

@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.

@fekete-robert
Copy link
Contributor

Sorry, I misunderstood, my bad.

@samiahmedsiddiqui
Copy link
Contributor Author

@chalin Please take a look of this PR.

Copy link
Contributor

@fekete-robert fekete-robert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@samiahmedsiddiqui
Copy link
Contributor Author

@fekete-robert @chalin Just wanted to nudge about the PR. Any chance we can get it merged soon?

@huanlin
Copy link
Contributor

huanlin commented Jul 22, 2024

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?

@samiahmedsiddiqui
Copy link
Contributor Author

samiahmedsiddiqui commented Jul 22, 2024

@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.

@huanlin
Copy link
Contributor

huanlin commented Jul 22, 2024

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>

Ah, I see. Thank you for your explanation. It makes sense to me :)

@huanlin
Copy link
Contributor

huanlin commented Jul 22, 2024

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 :)

@samiahmedsiddiqui
Copy link
Contributor Author

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.

@samiahmedsiddiqui
Copy link
Contributor Author

@chalin @fekete-robert When can I expect this PR to be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants