Gone3d
Gone3d

Reputation: 1189

Why do I get a Jekyll/Liquid syntax error when trying to access a folder outside of the current content

I get the following error:

Invalid syntax for include tag. File contains invalid characters or sequences: (ArgumentError)

../ossvlcm/go.md

Valid syntax:

{% include_relative file.ext param='value' param2='value' %}

The line of code throwing the error:

{% assign temp_url = nPath | append: chapter.file %}{% capture my_include %}{% include_relative {{ temp_url | append: '.md' }} %}{% endcapture %}

and nPath is create with:

  {% if page.ePath %}
    {% assign nPath = '../ossclvm/' %}
  {% endif %}

What I'm trying to do is include a file in from the a different folder from where the index.md resides. It seems to get hung up on the '../' characters but I've seen examples that use this.

So what exactly is wrong and how do I access other content from different folders?

Upvotes: 0

Views: 151

Answers (1)

Gone3d
Gone3d

Reputation: 1189

Found out that .. is not supported in Jekyll/Liquid.

I reformatted the folder structure to make this work, index files in the parent folders to the content files.

Not a great solution

Upvotes: 0

Related Questions