Hugo: Add double curly brace {{ }} conflict override

Created on 4 Apr 2015  路  7Comments  路  Source: gohugoio/hugo

Most helpful comment

Hey, I run into same problem (Hugo & AngularJS) as well. But here is my idea, why not to implement Laravel solution:

If you need to display a string that is wrapped in curly braces, you may escape the Blade behavior by prefixing your text with an @ symbol:
@{{ This will not be processed by Blade }}

Under Displaying Raw Text With Curly Braces

For me seems like very convenient yet simple solution, and I would prefer this option rather than changing delimitters. What do you think?

All 7 comments

Seems like solving this would involve changing the delims in the template library as soon as the config file is loaded, but what about all of the templates bundled with Hugo? You'd probably either

  1. Want to change them to something else, like << >> (blugh) or
  2. Somehow specify a list of locations/files which use the alternate format.

Thoughts?

I added some thoughts on the PR on the same subject.

See Pull Request #1052 contributed by @danke-click (marc on the forum),
and Issue #1300 "Make go template delimiter configurable".

This issue has been automatically marked as stale because it has not been commented on for at least four months.

The resources of the Hugo team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still valuable, please open a proposal at https://discuss.gohugo.io/.

This issue will automatically be closed in four months if no further activity occurs. Thank you for all your contributions.

Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.

If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.

Hey, I run into same problem (Hugo & AngularJS) as well. But here is my idea, why not to implement Laravel solution:

If you need to display a string that is wrapped in curly braces, you may escape the Blade behavior by prefixing your text with an @ symbol:
@{{ This will not be processed by Blade }}

Under Displaying Raw Text With Curly Braces

For me seems like very convenient yet simple solution, and I would prefer this option rather than changing delimitters. What do you think?

Replaced by #4513

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antifuchs picture antifuchs  路  3Comments

artelse picture artelse  路  3Comments

sigma picture sigma  路  3Comments

digitalcraftsman picture digitalcraftsman  路  3Comments

geddski picture geddski  路  3Comments