You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { CodeWave } from "gatsby-theme-waves"
<CodeWave>
```py# some code```# Some markdown```py# more code```
More markdown
> and more```py# and more```- ok
- that's enough
</CodeWave>
Installation
You need a Gatsby site with MDX. For example, this is how you add gatsby-theme-waves to a site that uses gatsby-theme-blog:
Install the theme (and deepmerge for merging the theme styles)
npm install --save gatsby-theme-waves deepmerge
Add the theme to your gatsby-config.js (at the end of the plugin list just in case)
import { CodeWave } from "gatsby-theme-waves"
<CodeWave>
```py# some code```# Some markdown```py# more code```
More markdown
> and more```py# and more```- ok
- that's enough
</CodeWave>
By default the lines that changed between two consecutive code blocks will be highlighted. You can change it to highlight the line (and columns) you want:
```js 1:3,6
// highlights line 1,2,3 and 6``````js 5[1,3:6],8
// highlights:// columns 1,3,4,5 and 6 from line 5// and line 8```
Coming Soon
Import code from files
Better custom code syntax highlighting using theme-ui