Skip to content

chore!: upgrade mdex to 0.13#185

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

chore!: upgrade mdex to 0.13#185
halostatue wants to merge 1 commit into
elixir-tools:mainfrom
halostatue:upgrade-mdex

Conversation

@halostatue

Copy link
Copy Markdown
Contributor

If a Tableau blog uses MDEx syntax highlighting, the latest version of MDEx has 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). Tableau includes the Lumis syntax highlighter package, but it is not fully configured without modification to the blog config/config.exs for selecting the appropriate syntax highlighting NIF:

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

The MDEx options configuration must also be updated:

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

More details for each syntax highlighter can be found at https://mdex.hexdocs.pm/lumis.html or https://mdex.hexdocs.pm/syntect.html.

@halostatue

Copy link
Copy Markdown
Contributor Author

Note that this builds on #184 (which is why there are two commits).

If a Tableau blog uses MDEx syntax highlighting, the latest version of
MDEx has 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). Tableau includes the Lumis syntax
highlighter package, but it is not fully configured without modification
to the blog `config/config.exs` for selecting the appropriate syntax
highlighting NIF:

```elixir
config :mdex_native, syntax_highlighter: :lumis
config :mdex_native, syntax_highlighter: :syntect
```

The MDEx options configuration must also be updated:

```diff
        render: [unsafe: true],
        syntax_highlight: [
-         formatter: {:html_inline, theme: "neovim_dark"}
+         engine: :lumis,
+         opts: [formatter: {:html_inline, theme: "neovim_dark"}]
        ],
        plugins: [MDExGFM]
```

More details for each syntax highlighter can be found at
https://mdex.hexdocs.pm/lumis.html or
https://mdex.hexdocs.pm/syntect.html.
@mhanberg

mhanberg commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Thanks, this looks straightforward.

I'm going to try this branch on my personal blog before merging.

Note to self: update the tableau_new mix archive as well.

@halostatue

Copy link
Copy Markdown
Contributor Author

I think the biggest trick is going to be making sure that the new version's release notes are clear on what needs to be done because it's not quite a routine release.

I haven't been able to get my latest blog published, but that's an infra issue on my end not a Tableau problem where I was using the git version yesterday for everything.

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.

2 participants