I'm a little behind the curve, I know, but today I just tried to move my
version of nanoc up to the latest (2.1.2).
I'm having a small problem my 'index' layout which causes a problem for
both 'nanoc update' and running the autocompiler. When I ran the update,
I got:
Message:
Expected 1 content file in layouts/index but found 2
I get the same error trying to run the autocompiler (returned as HTTP 500).
I have three layouts on my nanoc site like this:
rob -- ls -R
.:
article default index
./article:
article.erb article.yaml
./default:
default.erb default.yaml
./index:
index.erb index.yaml
The 'article' and 'default' layouts all have two files so what's special
about the 'index' layout?
If I rename the 'index' layout to something else e.g. 'front' it's all
fine. Some special name here?
Not sure if this a bug or what I'm otherwise doing wrong here. It's not
a big deal as I can work around it but any advice much appreciated.
Many thanks!
Rob
rob -- nanoc update
ERROR: An exception occured while loading this site.
If you think this is a bug in nanoc, please do report it at
<http://nanoc.stoneship.org/trac/newticket> -- thanks!
Message:
Expected 1 content file in layouts/index but found 2
Backtrace:
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/data_sources/filesystem.rb:629:in
`content_filename_for_dir'
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/data_sources/filesystem.rb:395:in
`layouts'
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/data_sources/filesystem.rb:393:in
`map'
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/data_sources/filesystem.rb:393:in
`layouts'
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/base/site.rb:235:in
`load_layouts'
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/base/site.rb:121:in
`load_data'
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/base/data_source.rb:34:in
`loading'
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/base/site.rb:115:in
`load_data'
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/cli/base.rb:134:in
`site'
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/cli/base.rb:121:in
`require_site'
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/cli/commands/update.rb:55:in
`run'
-
/var/lib/gems/1.8/gems/nanoc-2.1.2/bin/../lib/nanoc/cli/base.rb:84:in `run'
- /var/lib/gems/1.8/gems/nanoc-2.1.2/bin/nanoc:12
- /var/lib/gems/1.8/bin/nanoc:18:in `load'
- /var/lib/gems/1.8/bin/nanoc:18
rob --
>
> Hi,
>
> I'm a little behind the curve, I know, but today I just tried to
> move my
> version of nanoc up to the latest (2.1.2).
>
> I'm having a small problem my 'index' layout which causes a problem
> for
> both 'nanoc update' and running the autocompiler. When I ran the
> update,
> I got:
>
> Message:
> Expected 1 content file in layouts/index but found 2
>
> [..]
Hi Rob,
"index" has indeed a rather special meaning (for backward
compatibility reasons). The easiest solution would be to simply not
use the name "index" (use "home", "front", ... instead). You may also
want to avoid a layout named "meta" too, just in case. I'll fix this
ASAP. Hope this helps!
Regards,
Denis
--
Denis Defreyne
denis.d...@stoneship.org
I did exactly that - renamed to 'front' and it works perfectly.
Cheers,
Rob