Reusable content, liquid, jekyll and PDFs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Reusable content, liquid, jekyll and PDFs

rosie
Hi!

I work on a set of docs that are written in both asciidoc and markdown (we're a small team but I haven't convinced everyone to move to asciidoc yet - working on it!) and are presented primarily on a Jekyll site.

The asciidoc content I work with is also provided to some customers in PDF format.

I recently worked on some changes to our system so we can have reusable snippets across docs. I got this working on the jekyll site from both the asciidoc content and the markdown using liquid:

```
{% include snippets/my-snippet.adoc %}
```

and also setting a product version variable in the jekyll config file (_config.yaml) which we can refer to across docs as follows:

```
{{site.version}}
```

Unfortunately, this reusable content doesn't generate for the PDF versions, so I may have to backtrack on this idea, but I wanted to reach out here to see if there is a way to have reusable snippets and variables like this across both our jekyll site and asciidoctor-pdf output. Finger crossed!

Thanks for reading :-)

Rosie