Re: Problem with getting docinfo_processor to be used in jekyll asciidoctor
Posted by
mojavelinux on
URL: https://discuss.asciidoctor.org/Problem-with-getting-docinfo-processor-to-be-used-in-jekyll-asciidoctor-tp7326p7330.html
On Wed, Nov 6, 2019 at 4:28 PM maxandersen wrote:
Thanks for the fast answer Dan ! :)
👍
But I reckon for this particular usecase that is about adding style/css to the header postprocessor wouldn't be enough as it does not have access to the head elements to inject css/js.
That would be true even if the docinfo gets called. The scope of the AsciiDoc processing in a site generator is typically inside the main content area of the page. Here the docinfo (and even the postprocessor to a degree) doesn't apply.
Your proposal for simply adding it directly in via jekyll mechanics will in this specific case probably be better.
That's typically what I do.
Well, oh well - I won't be able to use this tabbed-code extension then but those using "raw" asciidoctor can if they want to :)
You could get the extension to detect the environment. If the attribute env-site is set, the extension could store the docinfo into a page attribute (e.g., page-javascripts). That attribute is then available to the template to echo.
Best,
-Dan
--