Skip to content

Markdown docs #620

@techniq

Description

@techniq

This issue is to track the feasibility of migrating the docs (back to) markdown.

LayerChart and Svelte UX docs used to be primarily in markdown (+page.md) but were migrated to pure Svelte (+page.svelte) years ago due to a multitude of issues:

  • Code completion
  • Type checking
  • Prettier formatting
  • Masked errors
  • No quickfix (ex. import) / highlighting of unused imports

The general authoring experience of markdown is better though, especially for guides and longer form writing.

MDsvex has an old issue for adding syntax highlighting to markdown. A evidence.dev developer added a comment on how they accomplished this within their extension (which has been now archived).

Regarding prettier, this looks more challenging as both mdx-analyzer and MDsveX have outstanding issues (the former has some upstream issues linked for prettier, mdx-js, remarkjs, and unifiedjs).


More generally, while this repo is currently using MDsveX (albeit only for a few pages now), I am considering switching to MDSX, which I've used on another project. I've had some issues with later versions of MDsveX and is the reason it's left on version 0.12.3 instead of 0.12.6.

I would also move away from Prism and use Shiki for syntax highlighting.



Improvements after switching

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions