Skip to content

Introduce parameter to exclude site title from the Title attribute#1935

Open
samiahmedsiddiqui wants to merge 4 commits into
google:mainfrom
samiahmedsiddiqui:excludeSiteTitle
Open

Introduce parameter to exclude site title from the Title attribute#1935
samiahmedsiddiqui wants to merge 4 commits into
google:mainfrom
samiahmedsiddiqui:excludeSiteTitle

Conversation

@samiahmedsiddiqui

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Sorry, I misunderstood, my bad.

@samiahmedsiddiqui

Copy link
Copy Markdown
Contributor Author

@chalin Please take a look of this PR.

@fekete-robert fekete-robert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@samiahmedsiddiqui

Copy link
Copy Markdown
Contributor Author

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

@huanlin

huanlin commented Jul 22, 2024

Copy link
Copy Markdown
Contributor

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

samiahmedsiddiqui commented Jul 22, 2024

Copy link
Copy Markdown
Contributor Author

@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

huanlin commented Jul 22, 2024

Copy link
Copy Markdown
Contributor

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

huanlin commented Jul 22, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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