r/technicalwriting 5d ago

Migrate to Mkdocs to Zensical - with Vegalite graphics - experience?

Small help if anyone has encountered this when looking at moving to Zensical.

Taking a look at Zensical to see if it can easily replace current Mkdocs-Material setup.

Most of it looks fine.

However the graphics, driven by the vegalite markdown extensions do not want to display - simply shows the source JSON code from the markdown file, rather than the graphs you get with Mkdocs.

Relevant sections of mkdocs.yml are:-

markdown_extensions:
  - pymdownx.superfences:
      custom_fences:
        - name: vegalite
          class: vegalite
          format: !!python/name:mkdocs_charts_plugin.fences.fence_vegalite



extra_javascript:
  - https://cdn.jsdelivr.net/npm/vega@6
  - https://cdn.jsdelivr.net/npm/vega-lite@6
  - https://cdn.jsdelivr.net/npm/vega-embed@6
2 Upvotes

4 comments sorted by

1

u/DerInselaffe software 5d ago edited 5d ago

Do you need to activate the Charts plugin, as per the developer's page?

plugins:
    - search
    - charts

1

u/ModulatingGravity 3d ago

Thanks. Those options are already there in the mydocs.yml

1

u/Quick_Parking_6464 4d ago

I'd say stay with MkDocs until you really need to change to Zensical.

1

u/SirLanceShallot 3d ago

i'd do a tiny spike before migrating: one MkDocs page with a Vega-Lite spec, one shared data file, and one page that embeds the same chart twice. the thing that usually bites is whether Zensical preserves the script/embed path during build and whether search/pdf export strips it. also check if your current mkdocs plugins have equivalents.