How to remove empty space in Jekyll?

In Jekyll templates, the used Liquid tags can generate many white spaces. From Liquid documents, use {{- -}}or {{% %}}to remove these spaces.

But I have Liquid syntax errorit when the Jekyll building.

How to fix this problem or do you have any other methods to remove spaces?

+4
source share
3 answers

Tags {{-and {%-exist in the latest beta version of the Liquid, but Jekyll uses the latest stable version, which does not include these tags.

Liquid 4.0, Jekyll , , Jekyll.

+5

I had success using the remove method and specifying a space:

Input
{{ "Multiple words here" | remove: " " }}

Output
Multiplewordshere
-1
source

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


All Articles