ddfreyne changed the topic of #nanoc to: 3.7.0 (June 8th) | 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
ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
alerante has quit [Ping timeout: 255 seconds]
<guardian> o/ morning
<bobthecow> night.
<bobthecow> you're obviously not on Silicon Valley Mean Time.
<ddfreyne> Hi
<ddfreyne> bobthecow: This still has the issue that you can have arbitrary code to be executed in mustache, so it has the same issue as erb/haml etc
<ddfreyne> But if all you want is good mustache support, yes
<bobthecow> oh, i know it still has the arbitrary code issue. i was addressing "nanoc's mustache support is bad though"
<bobthecow> :)
<ddfreyne> right
<ddfreyne> Off to work!
guardian has quit [Remote host closed the connection]
guardian has joined #nanoc
<guardian> bobthecow: :)
alerante has joined #nanoc
alerante has quit [Ping timeout: 260 seconds]
jonbullock has joined #nanoc
alerante has joined #nanoc
alerante has quit [Ping timeout: 272 seconds]
TobiasFar has quit [Ping timeout: 240 seconds]
TobiasFar has joined #nanoc
jonbullock has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
irsol has quit [Ping timeout: 264 seconds]
cDlm has quit [Quit: Computer has gone to sleep.]
alerante has joined #nanoc
alerante has quit [Ping timeout: 260 seconds]
irsol has joined #nanoc
cDlm has joined #nanoc
cDlm has quit [Remote host closed the connection]
cDlm has joined #nanoc
irsol has quit [Read error: Connection reset by peer]
alerante has joined #nanoc
irsol has joined #nanoc
jonbullock has joined #nanoc
alerante has quit [Remote host closed the connection]
ics has joined #nanoc
irsol has quit [Ping timeout: 260 seconds]
jugglinmike has joined #nanoc
irsol has joined #nanoc
FunkyPenguin has quit [Ping timeout: 255 seconds]
FunkyPenguin has joined #nanoc
FunkyPenguin has quit [Ping timeout: 240 seconds]
alerante has joined #nanoc
FunkyPenguin has joined #nanoc
alerante has quit [Ping timeout: 255 seconds]
jonbullock has quit [Quit: Textual IRC Client: www.textualapp.com]
cDlm has quit [Ping timeout: 260 seconds]
<guardian> week end!
cDlm has joined #nanoc
patdavid has joined #nanoc
<patdavid> hi all - just trying out nanoc as a new user. is there a simple way to get my css stylesheets into a sub-directory and having them referenced properly?
<patdavid> if i put my css in a subdirectory "content/styles/", and reference them in my layout, i crash
<patdavid> with "NoMethodError: undefined method 'path' for nil:NilClass
<patdavid> (referencing as <link rel="stylesheet" href="<%= @items['/normalize/'].path %>"> )
<patdavid> from the error i assume it's not picking up /normalize/ as an item
<patdavid> ?
<darix> patdavid: <%= @items.to_yaml %>
<patdavid> to_yaml?
<darix> then you can see all items
<darix> put pre around it
<patdavid> i simply want to house my css in a sub-directory
<patdavid> ah, will check that, thanks
<darix> you can
<darix> typing in my phone. typing code is hard like that :p
<darix> will check later
<patdavid> stack level too deep
<patdavid> ruby error
<darix> if nobody helps you, i will check later
<patdavid> ty
<patdavid> got it
<patdavid> needed @items['/styles/filename/'].path
<darix> patdavid: check rules file too
patdavid has quit [Ping timeout: 272 seconds]
alerante has joined #nanoc
patdavid has joined #nanoc
<patdavid> any advice on using relativize_paths?
<patdavid> i'm pushing into a sub directory on my host to test
<patdavid> I've tried adding "filter :relativize_paths, :erb" to my ruls, but no luck
<guardian> hmm you need two lines
<guardian> :filter relativize_paths
<guardian> :filter :erb
<guardian> :filter :relativize_paths
<guardian> it's :filter <filter name>, <filter parameters...>
<patdavid> ah
<patdavid> still errors
<patdavid> guardian, thanks
<patdavid> have to install nokogiri first
<patdavid> so, i have my css in a sub-folder "content/styles/...css"
<patdavid> and i refer to them in my layout as href="<%= @items['/styles/normalize/'].path %>"
<patdavid> relativize doesn't pick that up?
<patdavid> ah
<patdavid> it has to come after the layout
<patdavid> filter :erb
<patdavid> layout...
<patdavid> filter :relativize_paths
<bobthecow> yup.
<patdavid> also, is there a quick way to replace spaces in path/folder names with dashes for prettier url?
ics has quit [Ping timeout: 240 seconds]
ics has joined #nanoc
<guardian> you do that when routing
<patdavid> guardian, thank you (again) for the help! :)
<bobthecow> patdavid: i'd recommend the excellent stringex gem for that.
<patdavid> bobthecow, thanks, looking it up now
<bobthecow> same thing as guardian posted, but replace that regex with
<bobthecow> item.identifier.to_url
<bobthecow> oh, wait. you'd have to split it on / first.
<bobthecow> item.identifier.split('/').map(&:to_url).join('/')
<guardian> ah yeah I sometimes avoid avoid depending on too many gems
<guardian> maybe I should use more of them
<bobthecow> stringex is amazing.
<bobthecow> "1&2".to_url
<bobthecow> => "1-and-2"
<guardian> sold
<guardian> and good night :)
<bobthecow> g'night.
<bobthecow> happy weekend.
<patdavid> well crap
<patdavid> that added the '-', but borked pretty urls
<patdavid> not sure if i mind
<patdavid> nope, don't mind at all
<patdavid> killed 2 birds with one guardian stone, thank you!
<bobthecow> wait, it messed up pretty urls?
<bobthecow> "tell your readers 你好".to_url => "tell-your-readers-ni-hao"
<bobthecow> "10% off if you act now".to_url => "10-percent-off-if-you-act-now"
<bobthecow> yay stringex :)
<patdavid> well
<patdavid> it no longer pushed the target file into "index.html" under a path
<patdavid> but then pushed a-target-file.html instead
<bobthecow> oh, it should have.
<bobthecow> there's a whole section of the code that's trying to do that.
<patdavid> i'm wondering how to do something simple, and learning here
<patdavid> i want a sub folder of articles
<bobthecow> maybe item[:extension] isn't right?
<patdavid> article-one/ article-two/ article-three/
<patdavid> with an index.html inside and assets
<bobthecow> can you post a gist/pastebin of the rule in question?
<patdavid> binary files (images)
<patdavid> yep, one sec
<patdavid> so when i compile
<patdavid> i'd like it to be content/articles/article-N/
<patdavid> for instance
<patdavid> and for the output to be .../articles/article-N/
<patdavid> with an index.html in that output folder, along with assets
<patdavid> right now, it pushes the index.html into another sub folder below it
<bobthecow> isn't that what you just asked?
<bobthecow> what's the file, where is it routing it, and where do you want it to route?
<patdavid> i think i got it, one sec
<patdavid> yes, i just had to name the file index.html in my content folder
<patdavid> i want this file + assets: (/content/articles/some article folder name/*)
<patdavid> pushed to the same location on compile: (.../articles/some-article-folder-name/index.html/image.jpg/etc...)
<patdavid> sorry, that last line sucked
<bobthecow> ahh, yeah.
<bobthecow> in your content folder, you'd either have to have /articles/foo/index.html or /articles/foo.html to get that.
<patdavid> i went with index.html in the content folders
<patdavid> i like the idea of a clean folder for a particular post with assets
<patdavid> can i put the require "stringex" in the Rules file, and it works? (sorry, i know 0 ruby)
<bobthecow> yeah, you can put it just about anywhere.
<bobthecow> you might have to install it first.
<bobthecow> are you using a gemfile with your nanoc site?
<patdavid> locally? no
<patdavid> just installed nanoc and dependencies
<patdavid> and follow the tutorials
<patdavid> things are looking better at the moment
<patdavid> and i'm pretty happy so far with the results and environment
<patdavid> just need to learn a bit more of the syntax
<bobthecow> cool. feel free to ask question.
<bobthecow> s/question/questions/
<bobthecow> we're always here, even if we're not around :)
<patdavid> :)
<patdavid> thanks, i appreciate it!
<patdavid> have a great weekend!
patdavid has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Chicks dig it]
irsol has quit [Ping timeout: 240 seconds]