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
<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>
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