Sub-directory as site root for client proofing

3 views
Skip to first unread message

tenable

unread,
Dec 17, 2009, 1:23:29 PM12/17/09
to nanoc
Quick question that I wanted to run by you guys.

For client proofing I like to keep the site live on my server in "/
clients/company/", but Nanoc's default is "/".

I was thinking about creating a couple of rake tasks that looped
through my layouts gsub'ing href="/ and src="/ and to go back I would,
of course, gsub href="/clients/company/ So, then I could go back and
forth between the 2 paths. What do you guys think of this solution?
Any other ideas?

I just don't want their to be any issues as the site gets more and
more complex for whatever reason.

Choan Gálvez

unread,
Dec 17, 2009, 1:25:54 PM12/17/09
to na...@googlegroups.com

Better use the relativize_paths filter <http://nanoc.stoneship.org/manual/#list-of-built-in-filters
>

Best.
--
Choan Gálvez

Ukecosas. Los ukeleles que nos gustan, también para ti
Visítanos: <http://ukecosas.es/>
Escríbenos: <mailto:ukec...@ukecosas.es>
Síguenos en Twitter: <http://twitter.com/ukecosas/>

tenable

unread,
Dec 17, 2009, 3:49:34 PM12/17/09
to nanoc
Genius! I'll have to check that out.

> Escríbenos: <mailto:ukeco...@ukecosas.es>

tenable

unread,
Dec 17, 2009, 11:58:47 PM12/17/09
to nanoc
Ok, just got a chance to look into the relativize_paths filter and
wow, that was really easy!

compile '*' do
filter :erb
layout 'default'
filter :relativize_paths, :type => :html
end

Works perfectly!

Reply all
Reply to author
Forward
0 new messages