0
votes

I have a html file in a non-english langauge ( മലയാളം.html ). If I try to include this html file using the below code, I am getting the below shown error.

{% include blog_comments/മലയാളം.html %}

By the way I am using Jekyll. But I believe the error is from Liquid

Regenerating: 1 file(s) changed at 2016-05-05 09:49:14 Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences: blog_comments/മലയാളം.html Valid syntax: {% include file.ext param='value' param2='value' %} in _includes/post_comments.html, included in _layouts/post.html

Does anyone know how to get the file മലയാളം.html included ?

1
I'm not sure if blog_comments/മലയാളം.html itself is the right syntax. As far as I know you can use include to include only snippets having ".liquid" extension and nothing else. More on it here - docs.shopify.com/themes/liquid/tags/theme-tags#includeHymnZzy
Jekyll doesn't use Liquid include tag but its own flavor at github.com/jekyll/jekyll/blob/3.0-stable/lib/jekyll/tags/…David Jacquel

1 Answers

2
votes

If you read jekyll/tags/include.rb code, you can see that file names are validated against a regular expression, which main part is :

/^[a-zA-Z0-9_\/\.-]+$/

That means that includes names cannot contain something else than european alphabet letters (lower or upper case), numbers or /, _ , - and .

You will have to rename it to blog_comments/Malayalam.html ;-)

Note: You can have a page or a collection item (including posts) with a name containing മലയാളം