Something went wrong. Try again.
My monorepo ansonbiggs.com
Something went wrong. Try again.
1.6 kB
Markdown
at main
title: SyntaxHighlighting description: Syntax highlighting for code blocks. tags:
- plugin/transformer image: https://images.unsplash.com/photo-1580569214296-5cf2bffc5ccd repository: "quartz-community/syntax-highlighting" enabled: true required: false
This plugin is used to add syntax highlighting to code blocks in Quartz. See [[syntax highlighting]] for more information.
Note
For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
This plugin accepts the following configuration options:
theme: a separate id of one of the themes bundled with Shikiji. One for light mode and one for dark mode. Defaults totheme: { light: "github-light", dark: "github-dark" }.keepBackground: If set totrue, the background of the Shikiji theme will be used. Withfalse(default) the Quartz theme color for background will be used instead.clipboard: Whether to add a copy-to-clipboard button to code blocks. Defaults totrue.tokenClassification: Whether to add semantic token classification CSS classes to code tokens. Defaults totrue.
In addition, you can further override the colours in the quartz/styles/syntax.scss file.
API #
- Category: Transformer
- Function name:
ExternalPlugin.SyntaxHighlighting(). - Source:
quartz-community/syntax-highlighting - Install:
npx quartz plugin add github:quartz-community/syntax-highlighting