I'm working a site to generate reports on a lot of data in unpredictable formats. My (current) plan is to organize the content like so:
/content/raw/ # holds raw .csv, .json, .etc, isn't routed
/content/data/ # holds ruby scripts to generate nice formatted
# JSON from the appropriate raw data files,
# routed to /data/*.json
/content/listings/ # holds ruby scripts to generate JSON which represents
# an HTML table or HighChart object and based upon the
# formatted data items above, routed to /listings/*.json
# (and imported via AJAX to display on appropriate pages)
/content/assets/ # mostly passed through, filtering SASS to CSS, routed to
# /assets/*.ext
/content/pages/ # holds Markdown pages filtered to HTML and included in a
# layout, with a special helper to inject graphs/tables
# by identifying a listing item, routed to /*index.html
I'm not certain this is the best way to go about it however. In particular, I'm not sure how to work with nanoc so it knows to, say, regenerate a listing which depends on a raw data file which has been replaced with a new version. I also need to know how to write the Rules so that it uses Ruby code from within the item itself (and I'm not sure this is a good practice). Thoughts?