-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for previewing markdown #86
Comments
I imagine this to be based on unifiedjs/unified-engine#56. The same override functionality can be used, but instead of using a plugins:
# Linting and auto formatting
- remark-gfm
- remark-preset-lint-recommended
overrides:
# Override for linting MDX files as specified in https://github.com/unifiedjs/unified-engine/issues/56
- files: ['*.mdx']
plugins:
- remark-mdx
# Override for rendering a preview
- context: preview
plugins:
# custom remark plugins can be used
- remark-toc
# This will probably always be required
- remark-rehype
# rehype plugins can be used as well!
- rehype-autolink-headings |
Maybe? It’s interesting but it feels a bit like a) abusing the format, b) too much work for most folks (they’d have to set up a bunch of things), c) more powerful than needed (it’s a whole browser where anything could happen).
The other direction would be a tool that has like 3 options or so? Preview markdown | Preview GFM | Preview MDX. Maybe a few more toggles for common syntax extensions. When I try to answer why folks use markdown previewers, I can think of two main reasons:
|
Slightly different, but leaving it here to not forget: https://github.com/microsoft/vscode/tree/main/extensions/markdown-language-features/server#server-capabilities |
Initial checklist
Problem
The VSCode markdown previewer uses markdown-it, which does not support GFM, and does not support (of course) the used remark plugins.
Solution
Something like https://github.com/shd101wyy/mume probably, around unified.
It’s only really useful when the output is HTML, so for remark, we should probably find a
.remarkrc
and injectremark-rehype
,rehype-etc
afterwards?Is it one underlying project that supports Atom, VS Code, and other editors, and supports either remark or rehype? Or should there be separate projects for remark and rehype too? Or?
What about MDX?
CSS?
Alternatives
n/a
/cc @voxpelli
The text was updated successfully, but these errors were encountered: