ddfreyne changed the topic of #nanoc to: 3.6.7 (dec 9th) | web http://nanoc.ws/ | repo http://bit.ly/XE6e3G | issues http://bit.ly/VfXaSV | forum http://ho.io/n-discuss | irclog http://irclog.whitequark.org/nanoc
jarr0dsz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
louquillio has quit [Ping timeout: 250 seconds]
louquillio has joined #nanoc
louquillio has quit [Remote host closed the connection]
louquillio has joined #nanoc
jugglinmike has quit [Quit: Leaving.]
alerante has joined #nanoc
<bobthecow> i think that's the last of the issues you raised.
alerante has quit [Remote host closed the connection]
number-six has quit [Remote host closed the connection]
jaspervdj has quit [Remote host closed the connection]
ics has quit [Ping timeout: 240 seconds]
ics has joined #nanoc
VitamineD has joined #nanoc
alerante has joined #nanoc
jarr0dsz has joined #nanoc
alerante has quit [Ping timeout: 250 seconds]
jarr0dsz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
VitamineD has quit [Quit: VitamineD]
jarr0dsz has joined #nanoc
ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
VitamineD has joined #nanoc
number-six has joined #nanoc
jaspervdj has joined #nanoc
alerante has joined #nanoc
alerante has quit [Ping timeout: 246 seconds]
alerante has joined #nanoc
alerante has quit [Ping timeout: 265 seconds]
jarr0dsz has quit [Quit: Textual IRC Client: www.textualapp.com]
alerante has joined #nanoc
alerante has quit [Ping timeout: 252 seconds]
alerante has joined #nanoc
jugglinmike has joined #nanoc
cDlm has joined #nanoc
cDlm has quit [Client Quit]
VitamineD has quit [Ping timeout: 250 seconds]
alerante has quit []
louquillio has quit [*.net *.split]
ldk has quit [*.net *.split]
logankoester has joined #nanoc
louquillio has joined #nanoc
jaspervd1 has joined #nanoc
louquillio__ has joined #nanoc
louquillio__ has quit [Remote host closed the connection]
jaspervdj has quit [Write error: Broken pipe]
louquillio has quit [*.net *.split]
louquillio has joined #nanoc
ics has joined #nanoc
<tom[]> can i use routing rules to sort this problem out? Found 2 content files for content/special-topics/cpb-vs-nw; expected 0 or 1
<tom[]> if so, i can't think how
VitamineD has joined #nanoc
VitamineD has quit [Quit: VitamineD]
VitamineD has joined #nanoc
VitamineD has quit [Quit: VitamineD]
<tom[]> i'll try to give an example. there are two versions of a datasheet on welding robots. one is html and the other is php
<tom[]> sources are /content/datasheets/robots/welding.html and /content/datasheets/robots/welding.pdf
<tom[]> would be nice to have urls: /datasheets/robots/welding/ and /datasheets/robots/welding.pdf respectively
VitamineD has joined #nanoc
VitamineD has quit [Quit: VitamineD]
<dkm> tom[]: who is the author of these data sheets?
<tom[]> me
<dkm> i.e. if it's you, and the html and pdf are generated from the same source, then the way to do it is using Nanoc::ItemRep, I believe
<dkm> oh,wait, that's depricated
<dkm> but same idea
<tom[]> that's not practical. the production of the docs from their sources is just too complex. atm it is manual
<dkm> oh, well, that is too bad
<tom[]> i guess i can rename the pdf source and use a routing rule to give it the desired output name
<dkm> though, if you don't mind me asking, who is making it not practical? is it an externally inforced formatting guidline or something?
<dkm> because this is a classic example of the extra work we make for ourselves by not following the DRY/SPOT principle
<tom[]> if ms word worked better...
<dkm> oh gawd, don't even go down that road :)
<tom[]> i really don't know the right answer
<dkm> the ideal situation would be to write the datasheet in something like LaTeX
<dkm> there are probably even LaTeX templates out there for data sheets
<tom[]> shoot me now
<tom[]> it's the only tool i have that generates pdfs with working internal hyperlinks
<dkm> trust me, way easier than M$ Word B.S. you have to go through to get any type of reasnable, maintainable output
<dkm> Hmm, I have definitely done working internal hyperlinks with Beamer
<dkm> (LaTeX extension for presentations)
<dkm> and actually, footnotes and stuff have been linked automatically for me too
<dkm> whether or not that happens depends more on the LaTeX rendering engine than on the format itself
<dkm> which is what's nice about it
<dkm> but if that is not an option, then I suspect the quick fix to your currrent problem is to rename your source
<tom[]> the docs are finished. the cost of retooling now has no justification
VitamineD has joined #nanoc
<bobthecow> just rename one of the files.
<bobthecow> it'll be better in nanoc 4.x
<bobthecow> :)
<bobthecow> alternatively, those sound a lot more like static assets than things required to build your site, so you might want to use an asset data source.
<bobthecow> basically it's a simple rule and data source that copies everything across from, say, a folder in your project root called /assets/
<tom[]> i haven't gotten into data sources yet. just got the default
<tom[]> i'll take a looh
<tom[]> k
<tom[]> the pdfs are static
<tom[]> the html needs relativize_paths
<bobthecow> that's fine. move the pdf into a static data source, and leave the html in normal.
<tom[]> seems reasonable
<tom[]> tnx all
VitamineD has quit [Quit: VitamineD]
VitamineD has joined #nanoc
<bitsynthesis> bobthecow: is it possible to render content item within another content item? it's easy enough to select the @item via the @items array but I'm not really sure what to do with it from there
<bitsynthesis> i realize that nanoc really would prefer i put partials in /layouts
<bitsynthesis> but i think it complicates my dir structure to do it that way
<bobthecow> compiled_content(snapshot: 'foo')
<bobthecow> so in an erb file, that would look something like...
<bobthecow> <%= @items['/identifier/'].compiled_content(snapshot: 'last') %>
<bitsynthesis> aha, that class reference is just what i needed i think. thanks, was interested about what else could be done with an item object
<bobthecow> compiled_content just happens to pass through to an ItemRep
<bobthecow> which is why i linked you to that one.
<ddfreyne> yup
<ddfreyne> bobthecow: You should inherit from StandardError rather than Exception
<bobthecow> ooh. are you going to do a code review? :)
<ddfreyne> A "rescue => e" will not catch them otherwise
<bitsynthesis> ah, i see. thanks again
<bobthecow> ddfreyne: probably most of mine should extend runtime error anyway.
<ddfreyne> bobthecow: I don't really understand RuntimeError anyway
<tom[]> i'm starting to wonder about using nanoc as a build system for the static parts of a yii webapp
<tom[]> nicer than grunt
<bobthecow> tom[]: i've done it before for other webapps.
<bobthecow> i'd say it's worth it if you're building pages and stuff.
<bobthecow> grunt's prolly better if you're just building js and compiling scss or less.
<tom[]> does nanoc have something for extracting from an html doc everything inside <body>…</body>?
<ddfreyne> tom[]: Not directly, but you can write your own filter
<tom[]> might nokogiri be handy here?
<ddfreyne> tom[]: def run(content, params={}) ; Nokogiri.html(content).css('body').inner_html ; end
<ddfreyne> (untested)
<tom[]> hah!
<tom[]> tnx. so much easier to get started with example code
jugglinmike has quit [Quit: Leaving.]
VitamineD has quit [Quit: VitamineD]
VitamineD has joined #nanoc
bitsynthesis has quit [Quit: Page closed]