<dkm>
the more I use ruby/nanoc the more I like it :)
<dkm>
(nanoc was my reason for learning ruby)
<dkm>
design question: I am writing a Code Snippet module for Nanoc
<dkm>
a site I maintain makes use of coding examples from source code I currently have living in a separate directory
<dkm>
the idea being that the source code isn't really part of the site, I just want to reference parts of it when writing about it
<dkm>
right now, the way my snippet helper works is I set a snippet_path in my nanoc.yaml that could point to anywhere on my filesystem, then I have a function code_snippet(fname) that will attempt to open fname, deterimine its mime-type and render it with my snippet layout
<dkm>
does this make sense, or would there be a compelling reason to load code snippets as nanoc Items?
<dkm>
i.e. create a CodeSnippetDataSource
<dkm>
perhaps since I am using git to manage the site I should just use a git subtree to pull in the snippet directory into the site's directory structure
<VitamineD>
yes
<VitamineD>
loading snippets as nanoc items would make it possible for nanoc to recompile all pages that show that snippet
<dkm>
ah, yes, good point
<VitamineD>
currently, snippet changes won't show unless you change the page itself
<dkm>
right, I've had that issue with another external-data module I wrote
<dkm>
VitamineD: actually, only the item corresponding to the snippet is recompiled if a snippet file changes now... is there a way to tell nanoc that items that include other items depen on their included content?
<VitamineD>
hmm. that ought to work… maybe I'm remembering wrong
<VitamineD>
or maybe that's a feature that ddfreyne didn't completely implement yet
pavelkunc has joined #nanoc
pavelkunc has quit [Client Quit]
pavelkunc has joined #nanoc
alerante has joined #nanoc
<dkm>
is there a way to tell nanoc to ignore globs
<dkm>
?
<dkm>
e.g. the #filename.md# files that emacs creates
jarr0dsz has joined #nanoc
<tantalum>
dkm... You can add an empty route and the files won't be included in the output
<dkm>
thanks. seems like that will work as far as junk in the output, ideally I'd like nanoc to not even attempt to compile #*#
<VitamineD>
remove the items in the preprocess step
<tantalum>
VitamineD, +1
<VitamineD>
actually I'd train emacs to not crap everywhere
<VitamineD>
give it a treat.el when it's well behaved :)
<dkm>
VitamineD: haha, awesome :)
jaspervdj has quit [Ping timeout: 272 seconds]
jaspervdj has joined #nanoc
jarr0dsz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]