-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Titles are not handled properly anymore #4665
Comments
@Sotty75 can you show me a screenshot of how it was before, how it is now, so that we can more easily understand and compare? I'm assuming the minimal md doc to reproduce looks like this (I'm not certain because your sample only contains frontmatter): ---
title: Azure AD Configuration Setup
---
# My Header
Lorem Ipsum Some questions:
Why? Docusaurus support for h1 markdown headings ( If 2 h1 titles are declared on the doc, there is an ambiguity and Docusaurus has to pick one of the 2.
That's the expected behavior.
Already fixed with #4641), you can use |
With this doc: ---
title: Azure AD Configuration Setup
---
# My Header
Lorem Ipsum
## My Header 2
Lorem Ipsum 2
The behavior before (tested on alpha.71): The behavior after (master, using Docusaurus 2 website to test): The correct behavior is the behavior after the change. Having a double-h1 heading at the top of a markdown doc is not something semantically correct and you should simply not do that. We normally emit a console warning in this case. If you really want to, you will have to update your docs to put 2 headings in the markdown:
If you absolutely want to restore the behavior before, you can write a remark plugin that would extract your frontmatter title and put it at the top of the markdown content, but again I'd advise against this. |
There was really not a good reason to have the title in the frontmatter and in the markdown. It was like that as i migrated a set of existing Docs to docusaurus and then added the frontmatter by cut and paste on all of them, without understanding what i was doing. I cleared the ambiguity as suggested, removing the title from the frontmatter. Thanks a lot for fixing the other problem. |
Actually, I'll re-open because while testing newest Docusaurus site on a few existing sites I noticed this pattern was sometimes used.
Related: demisto/content-docs#616 (comment) |
Docusaurus v3.rc0 Doc pluginhide_title: true
|
🐛 Bug Report
The article titles are behaving differently than before and in not consistent ways.
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
followed by a header 1 title
# My Header
Expected behavior
I expect the front-matter Title to be hidden and the string My Header to be displayed as a title
Actual Behavior
My Header title is hidden as well.
Also if i have instead of
# My Header
a second level header immediately after the front-matter section, i see the ID displayed as a title.The text was updated successfully, but these errors were encountered: