hmans/flutterby

Unable to build static site

Opened this issue ยท 2 comments

Tried to run bin/flutterby build and obtained the following error. A partially filled folder _Build has been created. The localhost run bin/flutterby serve works well.

๐Ÿฆ‹ Flutterby 0.6.2
๐Ÿ“š Importing site...
๐ŸŒฒ Read 45 nodes.
๐Ÿ’พ Exporting site...
โ€ข Exported /css/styles.css
โ€ข Exported /files/year5.html
โ€ข Exported /img/247booking.png
โ€ข Exported /index.html
โ€ข Exported /js/app.js
โ€ข Exported /year10/Arts/arts_lesson_1.html
โ€ข Exported /year10/Arts/arts_lesson_2.html
โ€ข Exported /year10/Exegesis/exegesis_lesson_1.html
โ€ข Exported /year10/Exegesis/exegesis_lesson_2.html
โ€ข Exported /year10/lessons.html
/usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/node.rb:354:in block in render': undefined method html_safe' for nil:NilClass (NoMethodError)
Did you mean? html_safe?
from /usr/local/Cellar/ruby/2.4.3_1/lib/ruby/2.4.0/benchmark.rb:308:in realtime' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/node.rb:352:in render'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:19:in export_node' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:24:in block in export_node'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:23:in each' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:23:in export_node'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:24:in block in export_node' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:23:in each'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:23:in export_node' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:8:in export!'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/cli.rb:47:in block in build' from /usr/local/Cellar/ruby/2.4.3_1/lib/ruby/2.4.0/benchmark.rb:308:in realtime'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/cli.rb:38:in build' from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in start' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/exe/flutterby:10:in <top (required)>'
from bin/flutterby:17:in load' from bin/flutterby:17:in

'

Note, removing the html_safe from node.rb method allows the process to complete successfully.

Whilst, it successfully created a static build I noted a failure to render correctly the hyperlinks in .html.slim documents to other .html.slim documents.

For example;
li = link_to "Year 5", "/year5/lessons", class: "button"

is rendered in the _build directory as
<li><a class="button" href="/year5/lessons">Year 5</a></li>

instead of
<li><a class="button" href="/year5/lessons.html">Year 5</a></li>

Thanks