In my current setup I am trying to use middleman-search together with directory indexes and asciidoc.
While using that I am getting this error:
undefined method destination_path' for nil:NilClass C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/middleman-asciidoc-1.0.0/lib/middleman-asciidoc/template.rb:14:inprepare'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/tilt-2.0.8/lib/tilt/template.rb:99:in initialize' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/tilt-2.0.8/lib/tilt/mapping.rb:138:innew'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/tilt-2.0.8/lib/tilt/mapping.rb:138:in new' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/tilt-2.0.8/lib/tilt.rb:43:innew'
The problem is that the current page that needs to be rendered by asciidoc is not having a resource but only the :current_path. middleman-search runs through the sitemap and renderes all found resources like this:
The problem is that some of the resources in the sitemap are not found by the TemplateContext.current_resource by the :current_path when directory index is used.
Is it possible to change the middleman-asciidoc to render also by the provided path and not by calling resource.destination_path anymore when there is no resource?
In my current setup I am trying to use middleman-search together with directory indexes and asciidoc.
While using that I am getting this error: undefined method
destination_path' for nil:NilClass C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/middleman-asciidoc-1.0.0/lib/middleman-asciidoc/template.rb:14:in
prepare' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/tilt-2.0.8/lib/tilt/template.rb:99:ininitialize' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/tilt-2.0.8/lib/tilt/mapping.rb:138:in
new' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/tilt-2.0.8/lib/tilt/mapping.rb:138:innew' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/tilt-2.0.8/lib/tilt.rb:43:in
new'The problem is that the current page that needs to be rendered by asciidoc is not having a resource but only the :current_path. middleman-search runs through the sitemap and renderes all found resources like this:
https://github.com/manastech/middleman-search/blob/master/lib/middleman-search/search-index-resource.rb
The problem is that some of the resources in the sitemap are not found by the TemplateContext.current_resource by the :current_path when directory index is used.
Is it possible to change the middleman-asciidoc to render also by the provided path and not by calling resource.destination_path anymore when there is no resource?
Regards Lasse