Closed Koooooo-7 closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
docsify-preview | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 11, 2024 2:55am |
Hmm, I see yeah it is inconsistent depending how you land on the page. Clicking on your link, the title is alias
, but if you navigate to the page from inside Docsify, the title is Configuration
.
Also I think that it would be better for the title to be Docsify - Page
for each page whre Page
is the name of the page, or similar. F.e. Docsify - Configuration
, Docsify - Quick start
, etc.
Hmm, I see yeah it is inconsistent depending how you land on the page. Clicking on your link, the title is
alias
, but if you navigate to the page from inside Docsify, the title isConfiguration
.Also I think that it would be better for the title to be
Docsify - Page
for each page whrePage
is the name of the page, or similar. F.e.Docsify - Configuration
,Docsify - Quick start
, etc.
Yea, It makes sense that we could concat the name
of the site as a prefix. I gonna update it.
update.
Summary
Currently, on the v5 changes, each headings/links on the sidebar has the
title
via#addTextAsTitleAttribute
. https://github.com/docsifyjs/docsify/blob/42f25482fa1ea6ec666800145f6da33e9119aa8c/src/core/render/index.js#L20After the
event
refactor, the pagetitle
update function changed, especially the search page title.Example from our site. v4: On the main content load the page title such as
Configuration
, no matter you switch the sections toConfiguration
. or directly jump to its sub headings configuration?id=alias.v5 as-is: On the main content load the page title such as
Configuration
, switch the sections toConfiguration
. (same to v4 ) :warning: directly jump to its sub headings configuration?id=alias via the URL,it will update the page title tosub title
(alias
) instead. ⚠️ On the search function, when clicks the search result, it comes to the mess innerText as page title instead.The behavior for the sidebar headings for main content, I think it makes sense to indicate the specific target and respect the title. So, I fix the search problem via a consistent way that all retrieve page title from to the
title
attribute also. Now, it will use the${name} - ${title}
as the page title, if no name config, use title directly.Related issue, if any:
What kind of change does this PR introduce?
Bugfix
For any code change,
Does this PR introduce a breaking change?
Yes No
No
Tested in the following browsers: