Stream: IG creation
Topic: Asciidoc support?
Jose Costa Teixeira (Jan 12 2020 at 21:22):
Is Asciidoc not supported in IG pages, or depends on Jekyll installation...?
Grahame Grieve (Jan 12 2020 at 21:34):
depends on jekyll
Jose Costa Teixeira (Jan 12 2020 at 23:16):
I installed the gem. Is there any example of an ig using asciidoc so that I can quickly see how to get asciidoc to render correctly?
Grahame Grieve (Jan 13 2020 at 01:15):
fhirpath
Eric Haas (Jan 13 2020 at 03:43):
Bryn uses it too I think
Jose Costa Teixeira (Jan 13 2020 at 09:39):
Couldn't figure it out.
@Bryn Rhodes do you know how I can add asciidoc content? I have an .adoc file, and I added it to the file with generation=markdown. What am I missing?
Bryn Rhodes (Jan 13 2020 at 13:20):
You need to have the jekyll plugin installed, you need to have the _config.yaml (example from FHIRPath), and you need to have the jekyll front matter in the adoc files: https://raw.githubusercontent.com/HL7/FHIRPath/master/spec/index.adoc.
Jose Costa Teixeira (Jan 13 2020 at 13:26):
do you know where should I put the _config.yaml with the new template?
Jose Costa Teixeira (Jan 13 2020 at 13:32):
i put it in the pagecontent folder, but it does not seem to do it
Jose Costa Teixeira (Jan 13 2020 at 13:33):
my entry in the ig.xml is this
<page> <nameUrl value="asciidoc.html"/> <title value="AsciiDoc"/> <generation value="markdown"/> </page>
Bryn Rhodes (Jan 13 2020 at 14:08):
The _config is typically at the root of the jekyll content (it's a jekyll config file). And I don't ever put pages in the IG like that, just the fact that it's an adoc file in the pages folder kicks off the generation.
Jose Costa Teixeira (Jan 13 2020 at 14:10):
I cannot find the root of jekyll in the IG source. I also tried injecting it with the publisher in the -debug option. Still the same result. I'll continue checking
Bryn Rhodes (Jan 13 2020 at 14:10):
Try just building the FHIRPath IG and make sure that builds for you locally. That way you can at least verify that your system is properly configured.
Bryn Rhodes (Jan 13 2020 at 14:11):
Just clone and then run publish in the root.
Jose Costa Teixeira (Jan 13 2020 at 14:46):
This one builds ok locally
Jose Costa Teixeira (Jan 13 2020 at 14:46):
So I guess my question is how to do the same magic in the new template...
Bryn Rhodes (Jan 13 2020 at 14:55):
And the source files are named .adoc
?
Jose Costa Teixeira (Jan 13 2020 at 14:58):
in my other IG, yes
Bryn Rhodes (Jan 13 2020 at 15:35):
Hmmm, can you post the console output of the build?
Jose Costa Teixeira (Jan 13 2020 at 16:32):
The only thing that seems unusual is this
Jekyll: Source: C:/ImplementationGuides/be-core-asciidoc/temp/pages (04:29.0713) Jekyll: Generating... (04:29.0713) Jekyll: asciidoctor: ERROR: asciidoc.adoc: line 147: include file not found: C:/ImplementationGuides/be-core-asciidoc/temp/pages/include.asciidoc.txt (04:32.0108) Jekyll: [33m Build Warning: Layout 'current' requested in asciidoc.adoc does not exist.[0m (04:32.0114) Jekyll: done in 5.794 seconds.
Bryn Rhodes (Jan 13 2020 at 16:52):
Yeah, seems like it can't find the layout, so that seems like the whole Jekyll process wouldn't run for that page.
Lloyd McKenzie (Jan 13 2020 at 17:00):
The _config.yaml wasn't propagating in the current template. I'll be making a commit sometime today that should fix that. Is there anything special that needs to be in the yaml file?
Bryn Rhodes (Jan 13 2020 at 17:17):
For Asciidoc support, it needs:
plugins: - jekyll-asciidoc
Bryn Rhodes (Jan 13 2020 at 17:17):
But, that's only for asciidoc support, not sure it makes sense to put that in the base template?
Bryn Rhodes (Jan 13 2020 at 17:17):
The autobuilder has it, but I think in general people won't have that plugin installed.
Jose Costa Teixeira (Jan 13 2020 at 17:45):
I can also change my derived template. I just need to know where the _config.yaml goes. Once that's in in there is other fun stuff we can do
Jose Costa Teixeira (Jan 13 2020 at 17:49):
So my suggestion would be: put the file in the template in a place where jekyll will read it. It can be empty for normal users. And if we need to change it we just do instead of bothering Lloyd (yet again) :)
Lloyd McKenzie (Jan 13 2020 at 18:04):
Is there a reason why asciidoc is needed?
Jose Costa Teixeira (Jan 13 2020 at 18:18):
It's a Nice to have at this moment I think
Jose Costa Teixeira (Jan 13 2020 at 18:19):
HTML also does the job
Lloyd McKenzie (Jan 13 2020 at 18:23):
My preference is to keep the install expectations as minimal as we can
Jose Costa Teixeira (Jan 13 2020 at 18:37):
Definitely. If exposing the config is a simple thing, it leaves everything as it is for everyone, and might allow some advanced tweaking for those needing
Jose Costa Teixeira (Jan 13 2020 at 18:39):
I think it would enable other themes which I find more interesting than asciidoc per se
Lloyd McKenzie (Jan 13 2020 at 19:18):
The config could be overridden by another template if it wished. If you stick it in the right folder, you might even be able to override it with an IG.
Jose Costa Teixeira (Jan 13 2020 at 19:24):
I there is a way to do just that (i.e. where is the config supposed to reside?) that is fine
Lloyd McKenzie (Jan 13 2020 at 19:26):
In the template, it lives in the 'config' folder :)
Jose Costa Teixeira (Jan 13 2020 at 19:29):
I would have never found it there.
Jose Costa Teixeira (Jan 13 2020 at 19:30):
So this is the config that is used for jekyll?
Lloyd McKenzie (Jan 13 2020 at 19:39):
Yes. Current template isn't propagating it. After my next commit it will.
Last updated: Apr 12 2022 at 19:14 UTC