views:

18

answers:

1

Hello,

I'm building a site with nanoc and cannot find out how to use a global variable that could be incremented on the compilation of each page. The idea behind this is to get the list of all tags (incrementing the appearance number each time a tag is seen). I though that declaring the variable in lib/helper.rb would do the trick, but it's not working that way.

Any idea ? Thanks a lot,

Luc

ps: btw, that could be nice to have a nanoc tag

A: 

Ok, in fact, I just had to declare $my_var in lib/helpers.rb. This var is then accessible in all pages during compilation. Luc

Luc