Yeah for me too, especially if some functionalities won't be available for the MD/Org version, becoming a second-class support (like Org already is compared to MD).
Instead SiYuan uses a JSON file for each page, but it has excellent MD, PDF, ePub etc export support (via #Pandoc). And I am liking it.
Now I am exploring #Djot (by the author of Pandoc and Commonmark) instead of MD and I think it could be very good to store hidden metadata that now pollute #Logseq's MD files.
Oooh #Djot support also "+" to start a list, not only - and *, this is perfect!
The + could be used to encode the "collapsed" state of a block instead of something like {%collapsed%} or 'collapsed:: true' like #Logseq does!
And it is also nice that a "-" looks like a minus as in "click here to collapse the block" while the "+" resemble a button to show more so perfect to "expand the block".
I think I have solved how to structure visible and hidden data in #Djot @spinningthoughts
The lists that uses ":" instead of - or * are called "definitions" in Djot and could be used for sections' properties.
By looking at the AST, it should be easy to parse it and in general convert between a structured data format like JSON and this one.
Yes, years ago I created sort of plugins for the #KDE Dolphin file manager and every time I need to convert documents I select them in a bunch and then right click -> convert to [format]. It still amaze people when they see me doing it.
P.S. check #Djot, the new markup language by the author of #Pandoc, it's 90% like #Markdown but way better in my opinion: https://github.com/jgm/djot
@frebtherat @ednico @post @logseq
Also, if we replace #Markdown with #Djot (that is almost the same) we could use Djot's syntax for comments (as in programming languages) to have #Logseq-specific metadata hidden when exporting/rendering Djot files, as shown here:
https://pkm.social/@alexl/110651549732018204
and here:
Sooooo in that case, there's really only one thing missing from #djot to make it a drop-in replacement for our bastardization of CommonMark: GFM Autolinks.
https://github.github.com/gfm/#autolinks-extension-
That and spoilers. ๐
For context, I was foiled by #djot. ๐
I forgot that #CommonMark had an HTML title attribute syntax. i.e. [link name](https://link.url "link title"). Djot has this too, but it's generalized in their {attribute=value} syntax. I was tempted to add the classic syntax to djot, but in hindsight it's not very useful.
So, bold new idea: What if "link title" syntax was used for alt text? Accessibility is important, right?
Well, I forgot that images already have it: . ๐คฆโโ๏ธ
I need to run a quick errand, but when I return I'm going to run some experiments with #Pandoc (which BTW is from the same author #Djot).
The only blocker on migrating the legacy #LDJam data over is what to do with all the HTML content. If Pandoc can `.md` it, that's huge. ๐
Part of me wants to go directly from #HTML to Djot, but if I'm a good boy I'll stick with HTML to #Markdown, then do a massive Markdown to Djot port a different day. ๐
#pandoc #djot #ldjam #html #markdown
(Also, holy shit, I just discovered #pandoc, a universal document converter from the creator of #Djot! I need to run some tests, but this might be something I can use to convert the old #LDJam HTML blog post data into Commonmark! OMG, I was dreading having to write my own tool. ๐)
#Djot is awesome. โค๏ธ
Stop using Markdown and Commonmark!!
Djot is mostly compatible, removes ambiguity, it's designed to be easier to optimize, and is far more flexible/extendable for document authors.
Me toying with the #Djot parser, trying things that typical Markdown/Commonmark doesn't let you do.
Playground: https://djot.net/playground/
Summary of #Djot, an improved alternative to #Markdown and #Commonmark.
In a thread on text formatting, I found #djot casually mentioned (then ignored) as a recommended #Markdown/#Commonmark alternative.
I think I'm sold.
IMO it's better designed (single * for bold), removes ambiguity (# headers only), while being mostly compatible with Markdown/Commonmark.
A nice feature of Djot, in contrast to Markdown, is that it allows defining attributes for the language elements. This way you can modify the output of a certain "shortcut" in a easy way. Now Djota allows that too!
@javajoint which flavor of #Markdown to you plan to use, and with which processor for your #ebook ? Looks like #Djot might be the latest & greatest ๐https://djot.net/ Seems like it's John MacFarlene's Commonmark 2.0... implements ideas from https://johnmacfarlane.net/beyond-markdown.html
@pandoc I just read the specs. #djot seems well thought and conceived (it's no surprise when you look where it comes from), making it a very relevant alternative for #markdown in a wide array of usecases. I think it can become quite soon my new prefered format. I only wonder about the rationale that drove to omit a markup for bibliographical references.
Je dรฉcouvre le Djot. Lancรฉ en juillet 2022 par l'auteur de Pandoc John McFarlane. C'est un langage de balisage lรฉger dans le style de Markdown. Sur le site, on trouve tout ce qu'il faut pour que Pandoc puisse utiliser le Djot.
Djot
https://djot.net/
#shaarli2mastodon #djot #markdown #pandoc