wooosh / www

9 stars 0 forks source link

Beyond Markdown #2

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Beyond Markdown

What works well about markdown, what does not, and how to move forward, from the perspective of a personal blog.

https://wooo.sh/articles/beyond_markdown.html

touchmarine commented 2 years ago

I've hit the same problem with markdown. It's super simple for "plain-ish" content, but starts to fall apart if you need a more HTML-like feature set without the readability-hit of HTML. That's why I developed and use Touch (https://github.com/touchmarine/to).

Most developers, including me, are familiar with markdown's syntax and don't want to learn a new one. As such, I kept the syntax as similar as possible. Additionally, I had the opportunity to further simplify the syntax making the language more readable and predicatable while allowing for easier tooling. (See more about complex rules in Beyond Markdown).


As you noted, you quickly need your own flavor of markdown if you want something more out of markdown (like HTML elements or integrations). That's very true, but hard to realize for many developers and writers, as they don't have the time or the required knowledge to make their own flavor.

Touch solves this by being configurable and extendable via JSON. Underneath the surface, Touch isn't aware of any concrete elements, it only knows how to parse different, abstracted types of common elements. For example, it doesn't know what a blockquote is but it knows how to parse elements that look a blockquote. And via JSON you tell it that if something looks like a blockquote and starts with a ">", then it is a blockquote!

To make things easier, it comes with a default configuration that includes common elements (i.e. all markdown elements). Then, you or your team can extend the default configuration with your own and add the elements and integrations that you need! Checkout the Tour of Touch for a quick overview of Touch, including configuration.


Here a few other features that you may find interesting:

* Attributes are meant as an escape hatch so you don't need to jump to another tool/language if you need to bring variation to your document (like styling). They should be used sparingly!