Change start and end character in Jekyll to avoid Angular conflict

Both Angular.JS and Jekyll use {{ and }} to indicate the beginning and end of an expression. So, if you use both, conflict and Jekyll tend to destroy or mess with Angular expressions.

One fix is ​​to tell Angular to use different characters through $interpolateProvider , for example:

 var app = angular.module('app', [], function($interpolateProvider) { $interpolateProvider.startSymbol('[[{').endSymbol('}]]'); }); 

Is there any way to tell Jekyll to use different start and end characters?

UPDATE: Why? Just trying to find a less invasive way to resolve the conflict, since my projects usually contain much more Angular markup than Jekyll markup.

+6
source share
1 answer

Double braces taken from the language Liquid templating. I think you cannot change it.

Not sure what exactly you are trying to do, but you can leave using the raw tag. This tells the fluid to ignore the code that is placed inside it, and it will not try to interpret it:

 {% raw %} {{ some angular code here }} {% endraw %} 
+2
source

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


All Articles