ddfreyne changed the topic of #nanoc to: 3.6.8 (mar 22th) | 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
achal has quit [Quit: Connection closed for inactivity]
musicmatze has joined #nanoc
musicmatze has left #nanoc [#nanoc]
<timgauthier> anyone around?
alerante has joined #nanoc
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zi_ has joined #nanoc
zi has quit [Read error: Operation timed out]
zi_ is now known as zi
ics has joined #nanoc
alerante has quit [Remote host closed the connection]
achal has joined #nanoc
alerante has joined #nanoc
alerante has quit [Changing host]
alerante has joined #nanoc
relix has joined #nanoc
alerante has quit [Ping timeout: 252 seconds]
ics has quit [Quit: Textual IRC Client: www.textualapp.com]
jutah has joined #nanoc
alerante has joined #nanoc
alerante has quit [Ping timeout: 250 seconds]
VitamineD has quit [Quit: Leaving.]
VitamineD has joined #nanoc
relix has quit [Read error: Connection reset by peer]
relix_ has joined #nanoc
alerante has joined #nanoc
alerante has quit [Ping timeout: 258 seconds]
VitamineD is now known as cDlm
timgauthier has joined #nanoc
<timgauthier> aloha
<timgauthier> How do you include partials from locations outside the layout folder?
<timgauthier> is it possible to have variables that are different base on dev vs deploy?
<timgauthier> and I saw someone post in here before (chat logs) but it was the only place i could find that spoke about truncating blog posts in nanoc, but I couldn't figure out where the rest of the directions to get an :excerpt method to work. Is it possible to truncate compiled_content (before it gets compiled) so that you can display say 140 characters of a post in a .each for post content?
cDlm has quit [Quit: Leaving.]
alerante has joined #nanoc
alerante has quit [Ping timeout: 276 seconds]
jugglinmike has joined #nanoc
zi has quit [Ping timeout: 276 seconds]
koan_ has joined #nanoc
koan has quit [Ping timeout: 240 seconds]
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
VitamineD has joined #nanoc
alerante has joined #nanoc
relix has joined #nanoc
<bobthecow> timgauthier: hallo.
<timgauthier> hey
<bobthecow> did you sort out excerpts?
<timgauthier> nope, i started playing with middleman again
<timgauthier> the excerpts thing was why i switch from jekyll in the first place
<bobthecow> you're looking for the Text helpers:
<bobthecow> to use it, add this to lib/default.rb:
<bobthecow> include Nanoc::Helpers::Text
<bobthecow> then you have an `excerptize()` method available in your templates.
<bobthecow> <%= excerptize(@item.compiled_content) %>
<timgauthier> and how do you choose the length of excerpts?
<bobthecow> <%= excerptize(@item.compiled_content, length: 100) %>
<timgauthier> awesome ok, and so when i said this was the reason i moved from jekyll i was wrong. I had that in jekyll. Do you know about rendering partials outside of the layout folder?
<bobthecow> i think when i've used this before, i've stripped html out of it first so i got a "single paragraph" excerpt
<timgauthier> ok
<bobthecow> <%= excerptize(strip_html(...)) %>
<bobthecow> why do you want to render partials outside of the layout folder?
<timgauthier> well that was the reason i needed to leave jekyll. I have a projects section, each project has several examples of working webpages that appear in a modals. The html is adjusted to work in the modal and it is responsive and all that fancy pants. I don't want all of that html from each of the examples sitting in one big massive html files. I want to break out each example into a file that i can include
<bobthecow> it doesn't sound like you want to render partials then :P
<timgauthier> what do i want?
<bobthecow> what you want are items that are not included in output, but are included in another page.
<timgauthier> they are included in the output at the bottom of the page in divs that are then popped open as they are triggered.
<timgauthier> thats how it is working now, i just wanted to separate my code out
<bobthecow> that's fine.
<bobthecow> basically, if they're not templates, they're items instead of partials
<timgauthier> ok
<timgauthier> so then where would they exist?
<bobthecow> that whole "nanoc is flexible" thing ddfreyne was talking about means you can treat things like they are, rather than using partials as a workaround for the inability to compose items out of multiple other items.
<timgauthier> as a full file in the same folder, then i ?
<timgauthier> ahh I see ok neat.
<timgauthier> btw <%= excerptize(strip_html(@journal.compiled_content, length: 150)) %>
<timgauthier> isn't working and throwing an error on bundle exec
<timgauthier> this is within a <% sorted_articles.each do |journal| %>
<timgauthier> block
<bobthecow> get rid of the @
<timgauthier> ah. ok
<bobthecow> @ is just for if you're talking about the main item on this page: @item
<number-six> #<RubyParser::SyntaxError: Invalid char ' in expression. near line 1: "'re talking about the main item on this page: @item">
<timgauthier> sorry.. i really don't know ruby :S
<bobthecow> hey, thanks number six!
<bobthecow> what's your background?
<bobthecow> (timgauthier, not number-six)
<timgauthier> ArgumentError: wrong number of arguments (2 for 1) <- what does that mean?
<timgauthier> I am a designererer errrer. And I have hacked PHP (KirbyCMS) before
FunkyPenguin has quit [Ping timeout: 264 seconds]
<timgauthier> i'm currently running nanoc and middleman side by side bobthecow because i can't figure out which one is easier for me. so far i've figured out and made more progress on my own with middleman, but there are things in nanoc that i like too
<timgauthier> though the preprocessing in middleman is really nice to have :D
FunkyPenguin has joined #nanoc
<bobthecow> okay. @foo is like $this->foo
<bobthecow> timgauthier: nanoc does preprocessing :)
<timgauthier> really?
<bobthecow> before i tell you about nanoc's preprocessing, what exactly do you mean by that?
<timgauthier> I mean doing sass, compass, bourbon, and neat compiling
louquillio_ has quit [Ping timeout: 252 seconds]
<bobthecow> yeah. nanoc's all about that.
<timgauthier> ugh why you guys have to have so much parity .. mak'n it hard fee me!
<timgauthier> for me*
<timgauthier> i just need one to work for me and to get it up and running so i can actually move on :P
<bobthecow> i don't know that there's anything you can do with nanoc that you can't do with middleman, or vice versa.
<bobthecow> the philosophy is different, and the approach is different, but both are approximately the same level of flexibility and power.
<timgauthier> i don't really understand objects or how to use them, but the erg is much cleaner in nanoc
<bobthecow> i happen to like the nanoc approach better, but other people like middleman better :)
<timgauthier> i'm not sure why <%= excerptize(strip_html(journal.compiled_content, length: 150)) %>
<timgauthier> is causing a "ArgumentError: wrong number of arguments (2 for 1)" error
<timgauthier> <% if @menu != "off" %> in nanoc vs <% if defined?(menu) && menu != "off" %>
<timgauthier> thats what i meant by prettier erb. but yeah i don't know how i'm getting the 2 for 1
<bobthecow> the length goes outside of strip_html
<bobthecow> it's an argument to excerptize
<timgauthier> ah ok
<timgauthier> so how would i place an object into a page? like ... where do i put the other object in relation to my example.html and then what do i put in example.html to call example1.html
louquillio_ has joined #nanoc
timgauthier has quit [Quit: Textual IRC Client: www.textualapp.com]
<bobthecow> oh, boo. tim went away :(
<bobthecow> !tell timgauthier Sorry, I had to get to work.
<number-six> bobthecow: I'll pass that on when I see timgauthier here.
irsol has quit [Ping timeout: 240 seconds]
irsol has joined #nanoc
FunkyPenguin has quit [Ping timeout: 252 seconds]
FunkyPenguin has joined #nanoc
FunkyPenguin has joined #nanoc
<ddfreyne> Thinking about security makes me so damn paranoid.
<bobthecow> ddfreyne: never use computers for anything, and you'll have a chance at security.
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
alerante has quit [Ping timeout: 276 seconds]
<ddfreyne> bobthecow: I think I'm done with the first draft of the nanoc 4 guide
<ddfreyne> Since this will be a WIP for a long time to come, are you OK with me merging it?
<ddfreyne> This is the new section.
<ddfreyne> (Other reviewers also welcome :))
jutah has quit [Quit: Connection closed for inactivity]
alerante has joined #nanoc
alerante has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
achal has quit [Quit: Connection closed for inactivity]
alerante has joined #nanoc
alerante has quit [Ping timeout: 252 seconds]