Closed marcobehler closed 6 years ago
Did you copy the helpers.rb to \source_asciidoc_templates\ too?
Of course.....not :D
For anyone else interested in this: Copying the file over is however only half the story. You need to add the following to your Gemfile
gem 'opal', '~> 0.10.5'
Note You need to specify the version, as with newer versions of the opal gem it won't work.
Thanks @mojavelinux !
You can avoid the problem with Opal being used by setting the template_engine option. Otherwise, tilt goes a little crazy and tries to use Opal to compile the helper file.
Actually, it turns out the problem is putting the templates under the source folder. We don't want Middleman looking at those files, so it's best to move them outside the source directory. Then only Asciidoctor processes them, and it doesn't do stupid things like try to load Opal. I updated the README.
When I move the helpers.rb file out of the source folder, how do I tell Asciidoctor to pick it up, i.e. where to I configure it?
See the README. Move the whole templates folder. It was wrong of me to suggest that it goes inside source since Middleman monitors that folder.
On Sun, May 6, 2018, 05:21 Marco Behler notifications@github.com wrote:
When I move the helpers.rb file out of the source folder, how do I tell Asciidoctor to pick it up, i.e. where to I configure it?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/middleman/middleman-asciidoc/issues/88#issuecomment-386872214, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE192dzUt8VIGEJ4G6DJFDfbXwoSDJvks5tvtzGgaJpZM4Tzpsg .
Thank you!
Hi @mojavelinux , I've got a Middleman 4.2.1 project, with a
\source\_asciidoc_templates\block_outline.html.slim
file (Link), which I copied from the asciidoctor-backends project.Furthermore I have a layout file, which calls the following method:
Now i know that the block_outline.html.slim file is getting applied correctly (i.e. I also made the necessary changes to config.rb), because I get the following error message when trying to render my pages:
What am I missing? Why does it not find the helper appropriate helper methods?
Thank you! Marco