Mark markdown from yaml multi-line in Jekyll data file

When using Jekyll data files, I would like to save the formatted description, first of all, to the fact that I can have links. It works with HTML.

- name: Project name description: > I want to include a <a href="http://foobar.com">link</a> 

This displays correctly on the generated page when included in {{ project.description }} .

Can markdowns be used instead of HTML? I would prefer to do this:

 - name: Project name description: > I want to include a [link](http://foobar.com) 
+6
source share
1 answer

Turns off Liquid supports filters , but does not have one to handle markdowns. Fortunately, Jekyll adds its own set of handy filters that includes markdownify , so now I can do it:

  {{ project.description | markdownify }} 
+7
source

Source: https://habr.com/ru/post/985287/


All Articles