diff --git a/website/docs/blog.mdx b/website/docs/blog.mdx index f61cbad055..04e495224a 100644 --- a/website/docs/blog.mdx +++ b/website/docs/blog.mdx @@ -181,7 +181,7 @@ Blog post authors can be declared directly inside the front matter: -```yml title="my-blog-post.md" +```md title="my-blog-post.md" --- authors: name: Joel Marcey @@ -194,7 +194,7 @@ authors: -```yml title="my-blog-post.md" +```md title="my-blog-post.md" --- authors: - name: Joel Marcey @@ -222,7 +222,7 @@ This option works best to get started, or for casual, irregular authors. Prefer using the `authors` front matter, but the legacy `author_*` front matter remains supported: -```yml title="my-blog-post.md" +```md title="my-blog-post.md" --- author: Joel Marcey author_title: Co-creator of Docusaurus 1 @@ -265,7 +265,7 @@ In blog posts front matter, you can reference the authors declared in the global -```yml title="my-blog-post.md" +```md title="my-blog-post.md" --- authors: jmarcey --- @@ -274,7 +274,7 @@ authors: jmarcey -```yml title="my-blog-post.md" +```md title="my-blog-post.md" --- authors: [jmarcey, slorber] --- @@ -293,7 +293,7 @@ The `authors` system is very flexible and can suit more advanced use-case: You can use global authors most of the time, and still use inline authors: -```yml title="my-blog-post.md" +```md title="my-blog-post.md" --- authors: - jmarcey @@ -312,7 +312,7 @@ authors: You can customize the global author's data on per-blog-post basis: -```yml title="my-blog-post.md" +```md title="my-blog-post.md" --- authors: - key: jmarcey diff --git a/website/docs/seo.md b/website/docs/seo.md index c118ac9271..5a92a748dc 100644 --- a/website/docs/seo.md +++ b/website/docs/seo.md @@ -58,7 +58,7 @@ export default function page() { Docusaurus automatically adds `description`, `title`, canonical URL links, and other useful metadata to each Markdown page. They are configurable through front matter: -```yml +```md --- title: Title for search engines; can be different from the actual heading description: A short description of this page diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index e54e8b14bc..1afca6fb2c 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -336,7 +336,11 @@ const config = { prism: { theme: lightTheme, darkTheme, - additionalLanguages: ['java'], + // We need to load markdown again so that YAML is loaded before MD + // and the YAML front matter is highlighted correctly. + // TODO after we have forked prism-react-renderer, we should tweak the + // import order and fix it there + additionalLanguages: ['java', 'markdown'], }, image: 'img/docusaurus-soc.png', // metadata: [{name: 'twitter:card', content: 'summary'}],