Skip to content

Liquid preprocessor not applied to included AsciiDoc files #166

@lschmelzeisen

Description

@lschmelzeisen

According to the documentation, one should be able to set :page-liquid: to have the Liquid preprocessor be applied to AsciiDoc files. Currently, it seems like this is not applied to AsciiDoc files included from other files.

The reason for this is probably that Liquid is being run before the content is being passed to the AsciiDoc processor.

Steps to reproduce:

  1. Clone jekyll-asciidoc-quickstart

  2. Replace index.adoc by the following content:

    = Liquid in AsciiDoc Includes Test
    :showtitle:
    :page-liquid:
    
    {% for i in (1..3) %}
    {{ i }}
    {% endfor %}
    
    include::_myinclude.adoc[]
  3. Add file _myinclude.adoc to the root of the project with following content:

    {% for i in (1..3) %}
    {{ i }}
    {% endfor %}
  4. run jekyll serve (or equivalent) in the root of project

  5. visit the page generated by jekyll

Expected output

1
2
3
1
2
3

Observed output:

1
2
3
{% for i in (1..3) %} {{ i }} {% endfor %}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions