yegor256 / jekyll-plantuml

PlantUML plugin for Jekyll: helps you embed UML diagrams into static pages
https://rubygems.org/gems/jekyll-plantuml
MIT License
47 stars 15 forks source link

Invoke plantuml using code-block syntax #9

Closed noamtamim closed 8 years ago

noamtamim commented 8 years ago

Not sure if Jekyll plugins can do it, but worth the try. It would be awesome to be able to use this syntax for invoking PlantUML:

Alice->Bob: Hello!

Just like regular code. It makes the markdown file very readable even when not rendered by Jekyll. And it's less to type.

noamtamim commented 8 years ago

I have no idea how to escape the code block. My intention is to be able to use plantuml just like a language highlighter -- enter three backticks followed by plantuml, followed by the plantuml code.

davvd commented 8 years ago

@yegor256 please take a look at it and dispatch (see par.21)

yegor256 commented 8 years ago

@noamtamim see how I'm using it in my blog: https://raw.githubusercontent.com/yegor256/blog/master/_posts/2016/mar/2016-03-30-jare-instant-free-cdn.md

{% plantuml %}
skinparam componentStyle uml2
Browser -right-> [Edge]
[Edge] -right-> [Central]
[Central] -right-> [Origin]
{% endplantuml %}

This is how it looks in HTML: http://www.yegor256.com/2016/03/30/jare-instant-free-cdn.html

yegor256 commented 8 years ago

@noamtamim or I didn't understand your question?

noamtamim commented 8 years ago

It wasn't a question, but a feature request. When I want to put Java code in markdown, I write three backticks followed by the word "java". I then write the code block. I want to use the same logic for plantuml. Type three backticks, then "plantuml" and then the plantuml "code".

Is it possible?

yegor256 commented 8 years ago

@noamtamim nope, it's not possible in Liquid: https://shopify.github.io/liquid/