Repository navigation
chore!: upgrade mdex to 0.14 - #192
Open
halostatue wants to merge 1 commit into
Open
halostatue wants to merge 1 commit into
halostatue wants to merge 1 commit into
Conversation
If a Tableau blog uses MDEx syntax highlighting, the latest two versions
of MDEx have breaking changes to how syntax highlighting works and your
blog configuration must be modified for it to continue working.
There are two supported syntax highlighters: Lumis (tree-sitter) and
Syntect (Sublime Text grammars). This modification to Tableau does not
include either syntax highlighter package and shows Syntect as its
primary example with a documentation section added for the distinction
while linking to the MDEx page for each. Neither syntax highlighter
works without modification to the site `config/config.exs` for selecting
the appropriate syntax highlighting NIF:
```elixir
config :mdex_native, syntax_highlighter: :syntect
config :mdex_native, syntax_highlighter: :lumis
```
The MDEx options configuration must also be updated:
```diff
render: [unsafe: true],
- syntax_highlight: [formatter: {:html_inline, theme: "neovim_dark"}],
+ syntax_highlight: [engine: :syntect, theme: "Catppuccin Macchiato"],
plugins: [MDExGFM]
```
Contributor
Author
|
@mhanberg This is intended to replace #185; it upgrades to the latest version of MDEx and switches the examples to Syntect because it requires one extra configuration. Lumis >= 0.9 requires the WASM treesitter bundles added, so that's a lot more. I've tested this on my site (using the full language bundle for Lumis, since I have languages not supported by Syntect) in dev mode and it looks mostly good except that for some reason that light-dark theme switcher that used to work doesn't and I haven't investigated why, yet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If a Tableau blog uses MDEx syntax highlighting, the latest two versions of MDEx have breaking changes to how syntax highlighting works and your blog configuration must be modified for it to continue working.
There are two supported syntax highlighters: Lumis (tree-sitter) and Syntect (Sublime Text grammars). This modification to Tableau does not include either syntax highlighter package and shows Syntect as its primary example with a documentation section added for the distinction while linking to the MDEx page for each. Neither syntax highlighter works without modification to the site
config/config.exsfor selecting the appropriate syntax highlighting NIF:The MDEx options configuration must also be updated: