Skip to content

chore!: upgrade mdex to 0.14 - #192

Open
halostatue wants to merge 1 commit into
elixir-tools:mainfrom
halostatue:upgrade-mdex-014
Open

halostatue wants to merge 1 commit into
elixir-tools:mainfrom
halostatue:upgrade-mdex-014

Conversation

@halostatue

@halostatue halostatue commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

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:

config :mdex_native, syntax_highlighter: :syntect
config :mdex_native, syntax_highlighter: :lumis

The MDEx options configuration must also be updated:

        render: [unsafe: true],
-       syntax_highlight: [formatter: {:html_inline, theme: "neovim_dark"}],
+       syntax_highlight: [engine: :syntect, theme: "Catppuccin Macchiato"],
        plugins: [MDExGFM]

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]
```
@halostatue

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant