Escaping Double Curly Braces In Markdown
TAGS:
Escape Markdown Jekyll
How To Escape Double Curly Braces In Markdown In Jekyll
If you need to add the next two lines of code using markdown
this.page.url = "{{site.url}}{{page.url}}";
this.page.identifier = "{{ page.id }}";
The output will be:
this.page.url = "http://www.web2sons.xyz/2016/04/30/escaping_double_curly_braces_in_markdown.html";
this.page.identifier = "/2016/04/30/escaping_double_curly_braces_in_markdown";
But how to escape
the action of double curly braces
, This can be done by putting your desired code between {
%
raw
%
}
and {
%
endraw
%
}
.
So, Putting {
%
raw
%
}
”{{site.url}}{{page.url}}”{
%
endraw
%
}
The output will be:
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = "{{site.url}}{{page.url}}";
this.page.identifier = "{{ page.id }}";
};
</script>
Now, Take a look to this tutorial video.