Skip to content
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

Title customization for root element. #745

Closed
Edgar-Spiir opened this issue Jan 15, 2019 · 2 comments
Closed

Title customization for root element. #745

Edgar-Spiir opened this issue Jan 15, 2019 · 2 comments
Labels

Comments

@Edgar-Spiir
Copy link

Not sure if I'm misunderstanding something or perhaps there's actual issue with this.

Default behavior for title generation as noticed is this - {.md's first headline} - {title defined in index.html}

Scenario: I don't use a cover page, my home page is README.md at root of served directory. In my index.html I define a title with value Documentation.

Home's README.md:

# Home

Other content

My Sidebar:

* **Getting Started**
  * [Home](/)
......

Docsify config:

ga: 'ga code',
auto2top: true,
executeScript: true,
loadSidebar: true,
maxLevel: 3,
subMaxLevel: 2,
themeColor: "#19225B",

Expected behavior: When I navigate to root (e.g. localhost:3000/#/ ), I should see a title Home - Documentation

Actual behavior: When I navigate to root, I see title - Documentation

What's even worse is that even when tried making a workaround with defining a script in home page's markdown to change a title when document finished loading it didn't work on initial load. It works when i navigate somewhere else and when navigate to home through sidebar, but if I refresh home, when the title is once again - Documentation

From this I can see 2 possible future fixes:

  • Fix titles for root pages
  • Don't add the dash to the title if left side is empty, so that, if going back to my example, instead of - Documentation, it would Documentation at least.

I will probably try to solve this within docsify and make PR if I succeed, but to be fully honest, I'm not much of a JS developer.

@timaschew timaschew added the bug confirmed as a bug label Apr 23, 2019
@anikethsaha
Copy link
Member

anikethsaha commented Feb 14, 2020

@Edgar-Spiir Its working as expected for me.

Even docsify docs are working fine. Can you please confirm whether its coming for docsify@latest

PS: marking as wontfix for stale bot.

@anikethsaha anikethsaha added wontfix and removed bug confirmed as a bug labels Feb 14, 2020
@stale stale bot removed the wontfix label Feb 14, 2020
@stale
Copy link

stale bot commented Apr 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants