Replies: 1 comment
-
Hello @Benbinbin ; I don't think we'll be changing the MDC syntax in that direction. This syntax has been thought to have an editor in the first place, and that is part of the Nuxt roadmap. Currently the suggested way to interact with MDC syntax should be a VSCode environment with the MDC extension enabled. I think we could stop that discussion in favor of #1260 in which we'll track updates of the MDC syntax towards a better support in web editors and UIs. Thank you a lot for raising that point and taking so much time to provide examples, this has a lot of value for us! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The idea of MDC is so awesome, it supercharges markdown and makes markdown has more possibilties.
Problem
Let's say we design a static blog template or system for the regular users, it contain a lot of content components like the Content Wind template. Then users can just write the markdown files as blog posts, and they also can use the components by MDC syntax in markdown.
But for the normal users, they maybe don't know how to program and don't know how to set up the node environment to run the
npm run dev
command, most of them just learn the markdown and MDC syntax.So their daily use cases will be:
.md
files inside the/content
folder.md
in it).But I think the MDC syntax, which uses
::block-component
and:inline-component
maybe make the markdown preview a little bit "dirty" in common Markdown Editor for the regular usersVS Code built-in markdown preview mode
Idea
inspiring by the VS Code Folding feature: VS Code can evaluated the source code folding regions base on the indentation of lines, also language syntax
besides VS Code support to make a custom folding regions by adding some markers in the file, for Markdown the marker is
<!-- #region -->
for start region and<!-- #endregion -->
for end region, I usually use them to wrap the math code, so I can toggle the long code easilythe Gif shows that VS Code use the markdown comment syntax to add the toggle feature, but the preview mode don't show any addition content
So I think the MDC syntax can redisign, using markdown comment syntax, like
<!-- start::block-component -->
and<!-- end::block-component -->
for using block component in markdown, and<!-- :inline-component -->
for inline component.💡 another inspiring idea reference is remark-comment-config, it can config the remark parse rules by wrting some comments in markdown file.
Beta Was this translation helpful? Give feedback.
All reactions