Re: [nesta] if i can push to heroku, can i deploy a static site like
a static generator?
- From:
- ray delgado
- Date:
- 2011-11-24 @ 19:58
hey graham - i really appreciate you workin on this...if this works nesta
is going to be the ultimate static web generator!
so i have the script, and just put it in my the directory of my nesta
project, in this case /tooltips.com/
i dont understand how to modify line 24 to make it refer to a different
directory.
html.gsub!(/(<a href='[^h].*?)'/, "\\1.html'")
what goes where? and why does the \\1.html work? it seems no matter what i
add to that line things get messed up - can you direct me to something i
can read to understand this string better?
thanks so much!
by the way...just using the script as is now, it goes to the root
directory. i'd like to test it on a plain folder on the hard drive.
something like
d:/dropbox/nesta
but the links go back to the root directory of whatever drive html file
sits on...should the next email i send be to your personal?
On Tue, Nov 22, 2011 at 2:58 PM, Graham Ashton <graham@effectif.com> wrote:
> On 19 Nov 2011, at 14:36, ray delgado wrote:
>
> > No, sadly im on a Windows 7 machine.
>
> Okay, here's a start on a Ruby script:
>
> https://gist.github.com/1386713
>
> Enable caching in your config/config.yml file (in the development
> environment) and then start up a local web server before you run it. Watch
> out for the port number on line 5 if you're not using shotgun to launch
> Nesta (I don't think shotgun works on Windows).
>
> You're going to need some edits to the script to get it working via a
> network share, but I haven't tried to make it all work as I haven't got
> access to your setup to test it.
>
> Things I know I've missed:
>
> - Updating links to CSS files and the Atom feed.
> - Inserting the path to your shared drive into each link.
> - Packaging up all the .html files into a .zip.
>
> Line 24 is adding ".html" to each local URL, so that people will be able
> to load the file off a remote file system, rather than via an HTTP server.
>
> You'll probably need to modify line 24 so that it inserts the path to your
> network drive just before \\1.html (\\1 is the relative URL that is getting
> replaced).
>
> I think it'd be best to take this discussion off the list and for us to
> email about the script directly from now on; it could go quite off topic.
>
> Anybody who would benefit from a similar script can track future
> modifications on the gist...
>
> > (this may be off-topic so forgive me its an innapropriate question. is
> there a recommended Ruby version for running Nesta on Windows? I am using
> pik (windows rvm equivalent) so I can use any version)
>
> Windows isn't my forté, but I'd stick to 1.8.7 or 1.9.2 or later (those
> are the versions I test Nesta with on Unix).
>
> Cheers,
> Graham
Re: [nesta] if i can push to heroku, can i deploy a static site like
a static generator?
- From:
- ray delgado
- Date:
- 2011-11-23 @ 21:16
hey graham - i really appreciate you workin on this...if this works nesta
is going to be the ultimate static web generator!
so i have the script, and just put it in my the directory of my nesta
project, in this case /tooltips.com/
i dont understand how to modify line 24 to make it refer to a different
directory.
html.gsub!(/(<a href='[^h].*?)'/, "\\1.html'")
what goes where? and why does the \\1.html work? it seems no matter what i
add to that line things get messed up - can you direct me to something i
can read to understand this string better?
thanks so much!
by the way...just using the script as is now, it goes to the root
directory. i'd like to test it on a plain folder on the hard drive.
something like
d:/dropbox/nesta
but the links go back to the root directory of whatever drive html file
sits on.
On Tue, Nov 22, 2011 at 2:58 PM, Graham Ashton <graham@effectif.com> wrote:
> On 19 Nov 2011, at 14:36, ray delgado wrote:
>
> > No, sadly im on a Windows 7 machine.
>
> Okay, here's a start on a Ruby script:
>
> https://gist.github.com/1386713
>
> Enable caching in your config/config.yml file (in the development
> environment) and then start up a local web server before you run it. Watch
> out for the port number on line 5 if you're not using shotgun to launch
> Nesta (I don't think shotgun works on Windows).
>
> You're going to need some edits to the script to get it working via a
> network share, but I haven't tried to make it all work as I haven't got
> access to your setup to test it.
>
> Things I know I've missed:
>
> - Updating links to CSS files and the Atom feed.
> - Inserting the path to your shared drive into each link.
> - Packaging up all the .html files into a .zip.
>
> Line 24 is adding ".html" to each local URL, so that people will be able
> to load the file off a remote file system, rather than via an HTTP server.
>
> You'll probably need to modify line 24 so that it inserts the path to your
> network drive just before \\1.html (\\1 is the relative URL that is getting
> replaced).
>
> I think it'd be best to take this discussion off the list and for us to
> email about the script directly from now on; it could go quite off topic.
>
> Anybody who would benefit from a similar script can track future
> modifications on the gist...
>
> > (this may be off-topic so forgive me its an innapropriate question. is
> there a recommended Ruby version for running Nesta on Windows? I am using
> pik (windows rvm equivalent) so I can use any version)
>
> Windows isn't my forté, but I'd stick to 1.8.7 or 1.9.2 or later (those
> are the versions I test Nesta with on Unix).
>
> Cheers,
> Graham