I wish I didn't have to say this, but I have never really figured out much ofthe Rules file, and I don't quite know why. I get help for some problem periodically and trudge on until I hit the next bump, which I've just done. I've tried (experimentally) to get past this bump, but...here I am asking for help.
My Rules file is brief, so here it is:
compile '/index.html' do
filter :erb
layout '/default.*'
write '/index.html'
end
# gets 404 page and any other with html extent
compile '/*.html' do
filter :kramdown
filter :erb
layout '/default.*'
write item.identifier.without_ext + '/index.html'
end
# gets homepage
compile '/index.md' do
filter :kramdown
layout '/default.*'
write '/index.html'
end
# gets me "pretty URLs", per
https://groups.google.com/forum/#!topic/nanoc/b3sXlleJxcAcompile '/*.md' do
filter :kramdown
layout '/default.*'
write '/' + File.basename(item.identifier.without_ext) + '/index.html' # extent is stripped, then all but the file basename is stripped, leaving just the filename
end
# in the following, the /**/ IS necessary
compile '/**/*' do
write item.identifier.to_s
end
layout '/**/*', :erb
- - - - -
Questions:
1. What does this do?
# in the following, the /**/ IS necessary
compile '/**/*' do
write item.identifier.to_s
end
2. In the snippet above, what does "**" do? Why is it needed?
3. For the first time ever, I am assembling a site and NOT putting all files in root. What I'm experiencing is that files in directeries in root are not getting compiled. Example: /computer/applications.md ends up in /output completely uncompiled. What do I need in Rules to fix this?
My directory depth will go beyond root + /*/some-filename.md, if that matters.
4. Links to files on my local computer are not working and I'm mystified. Example:
[Dyson DC-14 user guide]("file:///home/tomc/Dropbox/Library/08501-09000/09000-Dyson-DC-14-User-Guide.pdf")
That produces a file not found message, but that location is where the file IS. I have to be messing up something obvious but I can't see it.
Thanks so much....as always.
Tom