Asciidoctor + Jekyll variables

Posted by Thibault Duchateau on
URL: https://discuss.asciidoctor.org/Asciidoctor-Jekyll-variables-tp3262.html

Hi there,

Does anyone know if it's still possible to use Jekyll variables in a file processed by Asciidoctor?

For example, I have a test.adoc file, in which I'd like to display my site base URL:
---
layout: post
title: Any title
---
=== Some title
And the base URL should be {{ site.baseurl }}

Unfortunately, the {{ site.baseurl }} variable seems to be totally removed from the rendered file.

I'm using:
* Jekyll v2.5.3 + Asciidoctor gem v1.5.2
* the jekyll-asciidoc plugin v1.0.0
* here follows a piece of my _config.yml file:
asciidoctor:
  attributes:
    - icons=font
    - source-highlighter=coderay

Thanks!

Regards,
Thibault.