Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
docs: use custom diff code blocks#5099
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
7b69687
7994449
67a3778
092909b
114d6ba
a49c0cc
9a5e252
ff80b53
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -139,6 +139,23 @@ const themeConfig: ThemeCommonConfig & AlgoliaThemeConfig = { | ||
styles: [], | ||
}, | ||
additionalLanguages: ['ignore'], | ||
magicComments: [ | ||
{ | ||
className: 'theme-code-block-highlighted-line', | ||
line: 'highlight-next-line', | ||
block: { start: 'highlight-start', end: 'highlight-end' }, | ||
}, | ||
{ | ||
className: 'code-block-removed-line', | ||
line: 'Remove this line', | ||
block: { start: 'Removed lines start', end: 'Removed lines end' }, | ||
}, | ||
{ | ||
className: 'code-block-added-line', | ||
line: 'Add this line', | ||
block: { start: 'Added lines start', end: 'Added lines end' }, | ||
}, | ||
], | ||
Comment on lines +142 to +158 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. New Docusaurus feature to add custom metadata to lines—suits this use-case quite well. I prefer using human-readable identifiers like "Remove this line", but if you want something that stands out more like for machines (e.g. "remove-next-line") just let me know | ||
}, | ||
tableOfContents: { | ||
maxHeadingLevel: 4, | ||
Uh oh!
There was an error while loading.Please reload this page.