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