mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 00:27:21 +02:00
fix(v2): fix contentTitle issues when markdown h1 title contains code blocks (#4882)
* attempt to fix contentTitle issues when markdown h1 title contains inline code blocks * mention hide_title frontmatter only prevents frontmatter.title from being added in the dom (not a markdown # title in content) * alwayss insert MainHeading under the div.markdown container for consistency * ensure MainHeading has no useless id * revert https://github.com/facebook/docusaurus/pull/4859 as it's now useless: docMeta.title contains the text/frontmatter title in priority over the contentTitle * fix docs test after revert * improve markdownParser and fix tests * fix docs tests * markdownParser: restore option to remove contentTitle (mostly for blog plugin) * use removeContentTitle for blog
This commit is contained in:
parent
85e87b560e
commit
57806798c5
20 changed files with 246 additions and 178 deletions
|
@ -180,7 +180,7 @@ describe('simple site', () => {
|
|||
isDocsHomePage: false,
|
||||
permalink: '/docs/foo/bar',
|
||||
slug: '/foo/bar',
|
||||
title: 'Remarkable',
|
||||
title: 'Bar',
|
||||
description: 'This is custom description',
|
||||
frontMatter: {
|
||||
description: 'This is custom description',
|
||||
|
@ -254,7 +254,7 @@ describe('simple site', () => {
|
|||
isDocsHomePage: true,
|
||||
permalink: '/docs/',
|
||||
slug: '/',
|
||||
title: 'Remarkable',
|
||||
title: 'Bar',
|
||||
description: 'This is custom description',
|
||||
frontMatter: {
|
||||
description: 'This is custom description',
|
||||
|
@ -286,7 +286,7 @@ describe('simple site', () => {
|
|||
isDocsHomePage: false,
|
||||
permalink: '/docs/foo/bazSlug.html',
|
||||
slug: '/foo/bazSlug.html',
|
||||
title: 'Baz markdown title',
|
||||
title: 'baz',
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/edit/master/website/docs/foo/baz.md',
|
||||
description: 'Images',
|
||||
|
@ -345,7 +345,7 @@ describe('simple site', () => {
|
|||
isDocsHomePage: false,
|
||||
permalink: '/docs/foo/bazSlug.html',
|
||||
slug: '/foo/bazSlug.html',
|
||||
title: 'Baz markdown title',
|
||||
title: 'baz',
|
||||
editUrl: hardcodedEditUrl,
|
||||
description: 'Images',
|
||||
frontMatter: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue