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
7b69687799444967a3778092909b114d6baa49c0cc9a5e252ff80b53File 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 MemberAuthor 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.