ddfreyne on main
Upgrade gems Simplify 4.12 live recompilatio… (compare)
ddfreyne on main
Spelling Make error more useful Merge pull request #1540 from d… (compare)
ddfreyne on main
Document webrick on Ruby 3 in t… Use high-DPI tutorial site scre… Sort Identifier methods alphabe… and 3 more (compare)
ddfreyne on main
Upgrade pygments.rb Drop support for TOML (hidden b… (compare)
ddfreyne on main
Upgrade gems Add What’s New section for Nano… (compare)
ddfreyne on 4.12.0
ddfreyne on main
Set version to 4.12.0 (compare)
ddfreyne on main
Upgrade Rubocop nanoc-live: Make release notes … nanoc-live: Set version to 1.0.0 and 3 more (compare)
$ bundle exec nanoc view -o 0.0.0.0
nanoc view
?
Cannot download livereload.js
#<Thread:0x00007f98a1d07280 /usr/local/lib/ruby/gems/2.7.0/gems/guard-livereload-2.5.2/lib/guard/livereload/reactor.rb:11 run> terminated with exception (report_on_exception is true):
/usr/local/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:in `start_tcp_server'14:17:51 - INFO - Guard is now watching at '/Users/greedo/Projects/myscript_sdk/doc'
: no acceptor (port is in use or requires root privileges) (RuntimeError)
from /usr/local/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:in `start_server'
from /usr/local/lib/ruby/gems/2.7.0/gems/guard-livereload-2.5.2/lib/guard/livereload/reactor.rb:51:in `block in _start_reactor'
from /usr/local/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:171:in `run'
from /usr/local/lib/ruby/gems/2.7.0/gems/guard-livereload-2.5.2/lib/guard/livereload/reactor.rb:50:in `_start_reactor'
from /usr/local/lib/ruby/gems/2.7.0/gems/guard-livereload-2.5.2/lib/guard/livereload/reactor.rb:11:in `block in initialize'
bundle exec nanoc live -L -V
nanoc live -L
if I have guard live reload
Magick::ImageMagickError: unable to open image `/vagrant/output/images/convert-batch.png': No such file or directory @ error/blob.c/OpenBlob/2874
Current item: /tools/inktool/overview.md (:default representation)
0. _factory/lib/images.rb:43:in `ping'
1. _factory/lib/images.rb:43:in `image'
2. item /tools/inktool/overview.md (rep default):185:in `get_binding'
output/
before it has arrived
output/
before launching compilation of item A. Is it what Nanoc is currently doing?
nanoc live
(the one that is provided by guard-nanoc) is a thin wrapper around both
what it the 'trick' in the blogging extension, why the question if items are frozen, and if, the data gets assigned to a variable just to return that
blk = -> { @items.select { |item| item[:kind] == 'article' } }
if @items.frozen?
@article_items ||= blk.call
else
blk.call
end
I can understsand that there might be some caching wanted, and that the result is returned if it exists
or does this something different?
but why the items.frozen question ? if this is not the case there is no caching, when is which branch relevant?
So, if you have one blog index page that depends on all individual articles, you could do e.g.
@items.find_all('/articles/*').each(&:path)
to force a dependency onto all those pages
A question to this ... what does it mean.. :-) , what does .each(&:path)
actually call on the item?
my ruby is not that strong, and from the doc I see there is a path property, but I am unsure how that relates, but I am very interested in understanding .
path
method on it
#path
makes Nanoc record a dependency onto the item that you called the #path
methd on)