Comment by battery_cowboy
6 years ago
Kinda on-topic (50/50): I'm looking for a flavor of something-like-markdown, but it would have semantic tagging and some abilities to add my own attributes to an element/tag (like for links, I want to be able to specify some to open in another tab, but others to open in the same tab, I'm willing to do that with raw attributes if I can add them on) for conversion to HTML in a static generator, is there something like that anyone knows about? (I prefer not to "roll my own" if I can use a standards-based language)
For instance, I'd want to do the example in the GitHub flavored markdown with tags like <article> or <aside> around markdown-like syntax. Markdown is so easy compared to HTML, so I want that ease in my article-writing workflow.
I was considering using HTML directly in a templating language, but I want it to be a more human-friendly text format, like Markdown.
Have you seen Pandoc[1]? I'm not sure it supports the particular cases you've stated, but I've been using it happily as an HTML generator[2].
1: https://pandoc.org/MANUAL.html
2: https://www.aib42.net/articles source at https://github.com/aib/www.aib42.net/tree/master/articles
I'll look at it thank you
You could try Pollen [1]; there’s a little bit of setup, but you can generate beautiful webpages in it. It even has a markdown dialect, in which you write most things in markdown, but you can also add your own custom tags.
[1]: https://docs.racket-lang.org/pollen/
Thank you I'll check it out
This can be done in Org files using text source blocks with `ATTR_HTML :target _blank`
https://emacs.stackexchange.com/questions/14320/org-mode-lin...
Thanks, I'll check Org out
markdown-it [1] has a number of plugins that let you add extra features to commonmark. For adding attributes, I wrote markdown-it-attrs [2]. Combine that with a flexible static site generator, like metalsmith [3], and you have a solution adjustable to your needs.
1: https://github.com/markdown-it/markdown-it 2: https://github.com/arve0/markdown-it-attrs 3: https://metalsmith.io/
I intend to use this setup, modified a bit, it's pretty much just what I was looking for: a very modular static generation tool that still uses a language I can read easily before generation, even if it isn't a 100% standard/stock language.
I was running into issues where some feature idea I had (ex: a way to expire an article based on some "code", like a function to check if Debian 10 is EOL yet in an article on how to install Debian 10) wouldn't be supported by my static generator, so I wanted to write my own or fork it, but instead I can just write modules for metalsmith or markdown-it for different features I need, it's perfect.
Thanks I'll check it out, it sounds kinda like what I'm looking for overall
Adding ids to parts of the text and then embedding Turtle in ``` regions would go a long way to making that possible.
I'm not sure I know what you mean. Do you have an example?
Sure. Here's some Markdown with Turle.
have you looked at asciidoc?
I will do that, thank you for the suggestion