Skip to content

feat!: add Tableau.MDExExtension - #193

Merged
mhanberg merged 7 commits into
mainfrom
mdex-as-package
Nov 18, 2026
Merged

mhanberg merged 7 commits into
mainfrom
mdex-as-package

Conversation

@mhanberg

@mhanberg mhanberg commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

This changes the MDEx integration from being a converter to being its
own extension.

The main goal of this is to make mdex an optional dependency for
Tableau, so a Tableau release is not required when mdex updates or makes
breaking changes.

  • Adds a convert callback to Tableau.Extension
  • Adds a Tableau.Converter.convert function for extensions to use
  • Post and Page extensions now will copy all files in the respective
    directory, and will convert them if there is a matching converter for
    that extension. Frontmatter is still required.
  • Adds an ext field to the Tableau.Page struct so you can use it later on

Breaking Changes

  • mdex is an optional dependency, so you must add it to your deps yourself.
  • MDex and converter options are now set by their extension module
    instead of the :config key.
  • The contract for Tableau.Converter.convert now just takes content
    and opts.
  • Tableau.Converter is no longer a behaviour.
  • Converters now are extensions that implement the convert callback.
  • Tableau.markdown is removed. Use Tableau.Converter instead.

This changes the MDEx integration from being a converter to being its
own extension.

The main goal of this is to make mdex an optional dependency for
Tableau, so a Tableau release is not required when mdex updates or makes
breaking changes.

- Adds a `convert` callback to `Tableau.Extension`
- Adds a `Tableau.Converter.convert` function for extensions to use
- Post and Page extensions now will copy all files in the respective
  directory, and will convert them if there is a matching converter for
  that extension. Frontmatter is still required.

- MDex and converter options are now set by their extension module
  instead of the `:config` key.
- The contract for `Tableau.Converter.convert` now just takes content
  and opts.
- `Tableau.Converter` is no longer a behaviour.
- Converters now are extensions that implement the `convert` callback.
- `Tableau.markdown` is removed. Use `Tableau.Converter` instead.
@mhanberg

mhanberg commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

@halostatue thank you for your earlier updates to mdex, but I've decided to decouple tableau from mdex a bit more. If you get some time, could you try out this branch? I believe I've called out all the important breaking changes, but I should probably also put in some migration tips "change this to this" etc.

edit: you might also have to install the tableau_dev_server package from github as i havent published that yet i dont think.

@halostatue

halostatue commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Apologies — I completely missed this tag. I'll try it tonight, but it might take a bit of time to be certain because I have several plugins which use the tight integration. It could be that #175 can be resolved with something like this, as well.

@mhanberg

Copy link
Copy Markdown
Collaborator Author

Apologies — I completely missed this tag. I'll try it tonight, but it might take a bit of time to be certain because I have several plugins which use the tight integration. It could be that #175 can be resolved with something like this, as well.

No worries at all. Thanks for taking a look!

@halostatue

Copy link
Copy Markdown
Contributor

I've run this on my site and extensions; it produces identical results to the last time I ran this with the outstanding MDEx upgrade. I will need to update a couple of extensions and I needed to make some changes to my site, but it works.

BTW, this doesn't solve #175 cleanly unless #175 (comment) is addressed (add :ext to the post/page definition) so that we can do Tableau.Converter.convert(post.extra_content, ext: post.ext) like the excerpt or revision capabilities I've got on my site. Right now I'm passing Tableau.Converter.convert(post.extra_content, ext: :md) because I only use Markdown, but if I had a djot converter and wanted to use both markdown and djot, then I would need to write excerpts or revisions in markdown, not djot.

@halostatue

Copy link
Copy Markdown
Contributor

A couple of notes from the agent that I used on Prosody to fix things:

  • optional(:markdown) is still in the Tableau.Config schema, so old configs pass validation and are then quietly ignored. It should either raise an error or warn that the option has moved.
  • The docs for post_extension.ex and page_extension.ex still refer to Tableau.MDExConverter, which no longer exists.

halostatue added a commit to halostatue/prosody that referenced this pull request Nov 13, 2026
elixir-tools/tableau#193 changes Tableau from having a Converter
behaviour to using a converter extension (`Tableau.MDExExtension`). This
checks for the configuration there, otherwise it tries to get the
configuration from the location _before_ the change.

In the unlikely event that _both_ exist, the newer configuration option
take precedence.

Signed-off-by: Austin Ziegler <[email protected]>
Assisted-by: Kiro (auto)
halostatue added a commit to halostatue/prosody that referenced this pull request Nov 13, 2026
elixir-tools/tableau#193 changes Tableau from having a Converter
behaviour to using a converter extension (`Tableau.MDExExtension`). This
checks for the configuration there, otherwise it tries to get the
configuration from the location _before_ the change.

In the unlikely event that _both_ exist, the newer configuration option
take precedence.

Signed-off-by: Austin Ziegler <[email protected]>
Assisted-by: Kiro (auto)
@mhanberg

Copy link
Copy Markdown
Collaborator Author

Thanks. I just moved and still haven't setup my office yet but I'll hopefully tidy this up in a couple weeks.

halostatue added a commit to halostatue/prosody that referenced this pull request Nov 15, 2026
elixir-tools/tableau#193 changes Tableau from having a Converter
behaviour to using a converter extension (`Tableau.MDExExtension`). This
checks for the configuration there, otherwise it tries to get the
configuration from the location _before_ the change.

In the unlikely event that _both_ exist, the newer configuration option
take precedence.

Signed-off-by: Austin Ziegler <[email protected]>
Assisted-by: Kiro (auto)
halostatue added a commit to halostatue/prosody that referenced this pull request Nov 15, 2026
elixir-tools/tableau#193 changes Tableau from having a Converter
behaviour to using a converter extension (`Tableau.MDExExtension`). This
checks for the configuration there, otherwise it tries to get the
configuration from the location _before_ the change.

In the unlikely event that _both_ exist, the newer configuration option
take precedence.

- Fixed a bug with parser option processing.

Signed-off-by: Austin Ziegler <[email protected]>
Assisted-by: Kiro (auto)
halostatue added a commit to halostatue/prosody that referenced this pull request Nov 15, 2026
elixir-tools/tableau#193 changes Tableau from having a Converter
behaviour to using a converter extension (`Tableau.MDExExtension`). This
checks for the configuration there, otherwise it tries to get the
configuration from the location _before_ the change.

In the unlikely event that _both_ exist, the newer configuration option
take precedence.

- Fixed a bug with parser option processing.

Signed-off-by: Austin Ziegler <[email protected]>
Assisted-by: Kiro (auto)
halostatue added a commit to halostatue/prosody that referenced this pull request Nov 15, 2026
elixir-tools/tableau#193 changes Tableau from having a Converter
behaviour to using a converter extension (`Tableau.MDExExtension`). This
checks for the configuration there, otherwise it tries to get the
configuration from the location _before_ the change.

In the unlikely event that _both_ exist, the newer configuration option
take precedence.

- Fixed a bug with parser option processing.

Signed-off-by: Austin Ziegler <[email protected]>
Assisted-by: Kiro (auto)
@mhanberg
mhanberg merged commit 0765694 into main Nov 18, 2026
10 checks passed
@mhanberg
mhanberg deleted the mdex-as-package branch November 18, 2026 14:15
mhanberg pushed a commit that referenced this pull request Nov 18, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.31.0](v0.30.0...v0.31.0)
(2026-11-18)


### ⚠ BREAKING CHANGES

* add Tableau.MDExExtension
([#193](#193))
- `mdex` is an optional dependency, so you must add it to your deps
yourself.
  - MDex and converter options are now set by their extension module
    instead of the `:config` key.
  - The contract for `Tableau.Converter.convert` now just takes content
    and opts.
  - `Tableau.Converter` is no longer a behaviour.
  - Converters now are extensions that implement the `convert` callback.
  - `Tableau.markdown` is removed. Use `Tableau.Converter` instead.
* extract TableauDevServer
([#190](#190))
* You must install the `:tableau_dev_server` package in the `:dev` env
now and change usages of `Tableau.live_reload` to
`TableauDevServer.live_reload`

### Features

* add Tableau.MDExExtension
([#193](#193))
([0765694](0765694))
* extract TableauDevServer
([#190](#190))
([6a6c894](6a6c894))


### Bug Fixes

* return {:ok, key} | :error in Tableau.Extension.key/1 spec
([#194](#194))
([f6f5e52](f6f5e52))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
halostatue added a commit to halostatue/prosody that referenced this pull request Nov 22, 2026
elixir-tools/tableau#193 changes Tableau from having a Converter
behaviour to using a converter extension (`Tableau.MDExExtension`). This
checks for the configuration there, otherwise it tries to get the
configuration from the location _before_ the change.

In the unlikely event that _both_ exist, the newer configuration option
take precedence.

- Fixed a bug with parser option processing.

Signed-off-by: Austin Ziegler <[email protected]>
Assisted-by: Kiro (auto)
halostatue added a commit to halostatue/prosody that referenced this pull request Nov 22, 2026
elixir-tools/tableau#193 changes Tableau from having a Converter
behaviour to using a converter extension (`Tableau.MDExExtension`). This
checks for the configuration there, otherwise it tries to get the
configuration from the location _before_ the change.

In the unlikely event that _both_ exist, the newer configuration option
take precedence.

- Fixed a bug with parser option processing.

Signed-off-by: Austin Ziegler <[email protected]>
Assisted-by: Kiro (auto)
halostatue added a commit to halostatue/prosody that referenced this pull request Nov 22, 2026
elixir-tools/tableau#193 changes Tableau from having a Converter
behaviour to using a converter extension (`Tableau.MDExExtension`). This
checks for the configuration there, otherwise it tries to get the
configuration from the location _before_ the change.

In the unlikely event that _both_ exist, the newer configuration option
take precedence.

- Fixed a bug with parser option processing.

Assisted-by: Kiro (auto)
Signed-off-by: Austin Ziegler <[email protected]>
halostatue added a commit to halostatue/prosody that referenced this pull request Nov 22, 2026
elixir-tools/tableau#193 changes Tableau from having a Converter
behaviour to using a converter extension (`Tableau.MDExExtension`). This
checks for the configuration there, otherwise it tries to get the
configuration from the location _before_ the change.

In the unlikely event that _both_ exist, the newer configuration option
take precedence.

- Fixed a bug with parser option processing.

Assisted-by: Kiro (auto)
Signed-off-by: Austin Ziegler <[email protected]>
halostatue added a commit to halostatue/prosody that referenced this pull request Nov 22, 2026
elixir-tools/tableau#193 changes Tableau from having a Converter
behaviour to using a converter extension (`Tableau.MDExExtension`). This
checks for the configuration there, otherwise it tries to get the
configuration from the location _before_ the change.

In the unlikely event that _both_ exist, the newer configuration option
take precedence.

- Fixed a bug with parser option processing.

Assisted-by: Kiro (auto)
Signed-off-by: Austin Ziegler <[email protected]>
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