0

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?

unor
  • 92,415
  • 26
  • 211
  • 360
Luc
  • 16,604
  • 34
  • 121
  • 183

1 Answers1

0

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
  • 16,604
  • 34
  • 121
  • 183