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