#markdown #md #web #ssg

mdxt

Custom Markdown Engine for my personal blog

28 releases (4 breaking)

Uses new Rust 2021

new 0.5.10 Sep 25, 2022
0.5.9 Sep 23, 2022
0.5.5 Aug 30, 2022
0.4.11 Aug 1, 2022
0.1.0 Jul 12, 2022

#245 in Web programming

Download history 9/week @ 2022-07-06 146/week @ 2022-07-13 173/week @ 2022-07-20 183/week @ 2022-07-27 79/week @ 2022-08-03 45/week @ 2022-08-10 36/week @ 2022-08-17 92/week @ 2022-08-24 78/week @ 2022-08-31 17/week @ 2022-09-07 36/week @ 2022-09-14 40/week @ 2022-09-21

188 downloads per month

MIT license

360KB
9K SLoC

MDxt

MarkdDown eXTended

MDxt is an extended markdown format. Though not a strict superset of gfm, MDxt supports most of its features. You can read more about it here

Some elements require proper CSS files to be rendered. You can either write your own, or use CSS files in this repo.

If you wanna know more about MDxt, see these articles.

GFM compatibility

GFM is a Github-flavored markdown format, which is one of the most widely used markdown extension.

MDxt can read most gfm documents, but the output is different. (ex: unlike gfm, code spans are rendered to <code class="short">.) It doesn't support some of gfm's syntaxes. (ex: indented code blocks, setext headings, and a few more)

I won't make any compatibility layers for gfm (ex: GFM <-> MDxt converter). Because some elements are impossible to convert to GFM formats. They require <script> tags in their output HTML, which are not supported in GFM and most other markdown extensions.

Contributing

Why Vec<u16>

Reading the source code, you'll see tons of Vec<u16>. Unlike most other crates, the engine doesn't use Vec<u8> for manipulating strings. That's because CJK characters don't fit in u8 characters. To handle them easily, Vec<u16> is the only choice.

Dependencies

~1.8–2.6MB
~46K SLoC