Markdoc design #486
Replies: 2 comments 1 reply
-
Hi @adriangalilea, want to address the second point. As support for Markdoc grows, I expect to see a a greater use of |
Beta Was this translation helpful? Give feedback.
-
On the question of syntax, there are a few reasons we ended up with We chose not to use conventional HTML-like tags ( We decided against things like The original Markdoc prototype used a bbcode-like syntax with square brackets (like this: When I added support for tags inside of fenced code blocks, there were a bunch of cases where it was difficult to distinguish between tags and regular content in the fences due to the ubiquity of curly braces in so many programming languages. We initially debated making it so that there was a separate tag syntax just for fenced code blocks, but ultimately decided that we wanted to have the tag syntax remain consistent everywhere. We had to pick a syntax that would be mostly unambiguous when mixed with conventional source code in mainstream languages. After considering several options, we settled on We chose not to make the syntax configurable because we wanted to encourage consistency between Markdoc projects and avoid adding unnecessary complexity to tools that parse and analyze Markdoc content. I think we are unlikely to change it at this point. |
Beta Was this translation helpful? Give feedback.
-
Let me start by saying that I deeply feel the need for something like markdoc to exist, code and content should be separated. So, that leaves
.mdx
out of the question and sadly.md
is not enough.With that in mind, I would like to share my thoughts:
Why
{% %} {% / %}
?One of the appeals for markdoc is allow authoring to non technical people, and seemingly trivial/minor decisions like these that create more boilerplate and uncomfortable key combinations, can be bothersome in day to day use, specially for newbies.
Markdoc
Some alternatives:
mdc
I'd personally choose
<>
like mdx but without imports and code separation...So is there a reason for
{% %} {% / %}
?Is this something that could be changed?
Why not an official file extension?
Why remain ambiguous?
For instance, Astro uses
.mdoc
, while other implementations use.md
, this makes the "framework" less recognisable and confusing, making adoption harder.I think Markdoc would benefit from an official file extension.
I'm aware that these are subjective points and perhaps uncomfortable to discuss, but I bring them in good faith.
Let me know what you think.
Thank you,
Adrian.
Beta Was this translation helpful? Give feedback.
All reactions