Skip to content

Commit

Permalink
Support Djot syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
irskep committed Aug 27, 2024
1 parent 45cfe4d commit 093bade
Show file tree
Hide file tree
Showing 8 changed files with 512 additions and 27 deletions.
19 changes: 19 additions & 0 deletions docs/src/features/syntax_highlighting.djot
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Syntax highlighting

Djockey supports [all the languages that Shiki supports by default](https://shiki.style/languages), plus Djot.

To highlight a code block, put the language next to the first set of backticks:

````djot
```md
# Some Markdown
```
````

To highlight an inline verbatim expression, add `{.language-foo}`{.language-djot} after your backticks:

```djot
`print("Hello, world")`{.language-python}
```

Output: `print("Hello, world")`{.language-python}
Loading

0 comments on commit 093bade

Please sign in to comment.