Liquid tags?
Closed this issue · 4 comments
Is it still possible to use Liquid tags within the content of a .org file? I know you disabled them, what was the purpose of doing so?
Thanks for the prompt reply, but sorry I don't quite understand.
The below behaviour is what I am after...
#+title: Lorem ipsum
#+layout: default
#+foo: Duis aute irure dolor in reprehenderit.
* Nulla posuere.
{{ page.foo }}
Donec vitae dolor. Nullam tristique diam non turpis.
Lorem {{ 'ipsum' | upcase }}
#+html: <div>Etiam vel tortor</div>
<h1>Nulla posuere.<h1>
<p>Duis aute irure dolor in reprehenderit.</p>
<p>Donec vitae dolor. Nullam tristique diam non turpis. </p>
<p>Lorem IPSUM</p>
<div>Etiam vel tortor</div>
I can of course use the "frontmatter" values in a layout template (e.g. {{ page.foo }}
in default.html
).
You can already use #+html: <div>Etiam vel tortor</div>
within the body content and it will via org-ruby
be included in the HTML rather than printed literally as <div>Etiam vel tortor</div>
.
I just changed little code about liquid, you can checkout the readme about liquid in usage section.
For now you can add a `#+liquid: arbitrary, then you can use the liquid template language, but for
Lorem {{ 'ipsum' | upcase }} this case , still not works baed org-ruby export , it translate the single quote to ‘ipsum’ .
UPDATE : just quick fix this, hack and dirty way, but it's works now.
That's pretty wonderful, many thanks!