Skip to content

Instantly share code, notes, and snippets.

@pietrodesiato
Created April 20, 2016 11:21
Show Gist options
  • Save pietrodesiato/5a51cebb3e4d805f9b8eb96ff71895de to your computer and use it in GitHub Desktop.
Save pietrodesiato/5a51cebb3e4d805f9b8eb96ff71895de to your computer and use it in GitHub Desktop.
#### UPDATE LAYOUTS (in the layouts folder)
{{<layouts(.*)}}((.|\n)*){{\/(.*)}}
replace with
{% extends "$1.html" %} $2
#### UPDATE BLOCK TITLES
{{\$(\w+)}}
((.|\n)*)
{{\/(\w+)}}
replace with
{% block $1 %} \r $2 \r {% endblock %}
#### UPDATE INCLUDES
{{>(.*)}}
replace with
{% include "$1.html" %}
#### UPDATE IF TRUE CONDITIONALS
{{#(.*)}}((.|\n)*){{\/(.*)}}
replace with
{% if $1 %} \r $2 \r {% endif %}
#### UPDATE IF NOT TRUE CONDITIONALS
{{\^(.*)}}((.|\n)*){{\/(.*)}}
replace with
{% if not $1 %} \r $2 \r {% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment