feat(theme-classic): extensible code block magic comment system (#7178)

This commit is contained in:
Joshua Chen 2022-05-04 18:31:13 +08:00 committed by GitHub
parent 785fed723f
commit 51815c12c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 692 additions and 161 deletions

View file

@ -378,6 +378,17 @@ const config = {
// TODO after we have forked prism-react-renderer, we should tweak the
// import order and fix it there
additionalLanguages: ['java', 'markdown', 'latex'],
magicComments: [
{
className: 'theme-code-block-highlighted-line',
line: 'highlight-next-line',
block: {start: 'highlight-start', end: 'highlight-end'},
},
{
className: 'code-block-error-line',
line: 'This will error',
},
],
},
image: 'img/docusaurus-soc.png',
// metadata: [{name: 'twitter:card', content: 'summary'}],