-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom HTML macros #55
Comments
I think we should rely on standard markdown for defining the content. That way any normal editor will be able to format it locally as well as GitHub in the online editor. Special cases will just make it harder for everyone to understand what is going on. For VERY VERY important stuff (a table) HTML can be used directly. Also this feature would require changes to vibe.d's md parser (or a custom one). So I don't think the benefits outweigh the drawbacks. |
I reopen this as it seems that we need to find a simple way to have custom HTML macros/templates that allow us to separate HTML from the markdown text and make translations easier (see e.g. #248) |
Agreed that this might be useful. Problem is that would need to either enhance the current vibe.d markdown filter or use another markdown processor that allows more customisation. There currently is just one other markdown parsed listed at code.dlang.org which basically is the vibe.d markdown parser but stripped out of the framework. |
Hmm do we really need to touch the Markdown engine? Basically we could apply our macros before converting the text to markdown? https://github.com/Shopify/liquid/wiki/Liquid-for-Designers But basically for the beginning we only need to able to extend something like They could be defined in a
I am still worried about rolling our own system here - @stonemaster do you have better ideas? :) |
Unfortunately I have no better idea. But something that resembles liquid in some way is still better than cluttering the content md's with layout html. We should just make sure that we dont't make sure to not make use of those special features too often and try to achieve as much as possible with standard markdown.. |
An idea I just had: maybe we could use the Diet templating system? That way we don't need to roll our own system. I don't want to compile necessarily because that makes compilation of the dlang tour really slow. Maybe we can find a way to do that at runtime.. |
Unfortunately the vibe.d and Diet way won't work. Will try to look into another solution. Currently still the own regex thingie is the best solution.. |
I found this one: https://github.com/repeatedly/mustache-d |
Working on a solution using mustache. Looks promising so far. Should habe something weithin the next days. |
Vibe.d will support markdown tables soon! |
Implement HTML macros by using Mustache. Fixes #55.
I can think of four good examples
Probably 1,2,3 could be summarized into 2 categories only.
The text was updated successfully, but these errors were encountered: