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

fix(v2): fix title logic (meta vs heading) + ignore fixed anchor id syntax #4688

Merged
merged 8 commits into from
Apr 27, 2021

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Apr 27, 2021

Motivation

Fixes #4665 (comment) + handle fixed anchor syntax

Keep behavior we had before:

  • frontmatter.title controls page meta in priority
  • markdown # title controls page h1 heading in priority

We should rather not use fixed anchor ids syntax on top level h1 headings, as user should not use h1 headings in his doc normally anyway:

  • writeHeadingIds cli will not write custom anchor ids for h1 md titles, and # myTitle remains untouched
  • a markdown title as # myTitle {#my-anchor} will now parse correctly title = myTitle

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

test

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Apr 27, 2021
@slorber slorber requested a review from lex111 as a code owner April 27, 2021 13:03
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Apr 27, 2021
@netlify
Copy link

netlify bot commented Apr 27, 2021

[V1]

Built with commit 5354b3a

https://deploy-preview-4688--docusaurus-1.netlify.app

@netlify
Copy link

netlify bot commented Apr 27, 2021

[V2]

Built with commit 5354b3a

https://deploy-preview-4688--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Apr 27, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 87
🟢 Accessibility 96
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-4688--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Apr 27, 2021

Size Change: 0 B

Total Size: 631 kB

ℹ️ View Unchanged
Filename Size Change
website/build/assets/css/styles.********.css 88 kB 0 B
website/build/assets/js/main.********.js 453 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 62.3 kB 0 B
website/build/docs/introduction/index.html 235 B 0 B
website/build/index.html 27.1 kB 0 B

compressed-size-action

@slorber slorber merged commit 8ebbc17 into master Apr 27, 2021
@slorber slorber deleted the slorber/markdown-title-parsing-fixes branch August 17, 2021 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Titles are not handled properly anymore
2 participants