Re: Asciidoctor + Jekyll variables

Posted by johncarl81 on
URL: https://discuss.asciidoctor.org/Asciidoctor-Jekyll-variables-tp3262p3267.html

Thibault,

The variable substitution should work as you've described.  For comparison, I have a variety of variables replaced on http://androidtransfuse.org.  Namely the "site.currentVersion" variable:
Declared: https://github.com/johncarl81/transfuse-site/blob/master/_config.yml#L5
Used: https://github.com/johncarl81/transfuse-site/blame/master/index.adoc#L80

which is defined in the front matter of each page: https://github.com/johncarl81/transfuse-site/blame/master/index.adoc#L3

Reviewing your setup, you may need to define the variable baseurl in your _config.yml file.

Hope that works for you.

John

On Sun, May 24, 2015 at 3:25 PM, Thibault Duchateau [via Asciidoctor :: Discussion] <[hidden email]> wrote:
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 1.5.2
* the jekyll-asciidoc plugin
* here follows a piece of my _config.yml file:
asciidoctor:
  attributes:
    - icons=font
    - source-highlighter=coderay

Thanks!

Regards,
Thibault.




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-Jekyll-variables-tp3262.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML