librelist archives

« back to archive

if i can push to heroku, can i deploy a static site like a static generator?

if i can push to heroku, can i deploy a static site like a static generator?

From:
ray delgado
Date:
2011-11-19 @ 12:58
nesta is a beautiful cms, i would like to use it instead of jekyll or
middleman. can i publish or deploy a nesta created site like that?

Re: [nesta] if i can push to heroku, can i deploy a static site like a static generator?

From:
Graham Ashton
Date:
2011-11-19 @ 13:11
On 19 Nov 2011, at 12:58, ray delgado wrote:

> nesta is a beautiful cms, i would like to use it instead of jekyll or 
middleman. can i publish or deploy a nesta created site like that?

The first thing to consider is why you'd want to do it.

There's no benefit in doing so unless the hosting environment that you'd 
like to deploy it to will only support static HTML files.

If that was the case it wouldn't be too difficult to generate the HTML 
from a local copy of the site.

You could enable file caching in config.yml, then write a script to 
request every page on a local copy of your site. Nesta would write .html 
files into your ./public folder. You could then move those .html files to 
your public server.

It would be easier to just deploy to Heroku though, if you're not tied to 
a specific hosting platform…

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-19 @ 13:36
Thats it, my environment only allows static files.  Its just folder on a
shared network.  I've created a tutorial website using 'The Middleman'.
 However, I'll be adding guides more often and they all need to be
relatively linked because I have the navigation in the one layout shared by
all templates.

Any help on writing this script that writes to a ./public folder?

On Sat, Nov 19, 2011 at 8:11 AM, Graham Ashton <graham@effectif.com> wrote:

> On 19 Nov 2011, at 12:58, ray delgado wrote:
>
> > nesta is a beautiful cms, i would like to use it instead of jekyll or
> middleman. can i publish or deploy a nesta created site like that?
>
> The first thing to consider is why you'd want to do it.
>
> There's no benefit in doing so unless the hosting environment that you'd
> like to deploy it to will only support static HTML files.
>
> If that was the case it wouldn't be too difficult to generate the HTML
> from a local copy of the site.
>
> You could enable file caching in config.yml, then write a script to
> request every page on a local copy of your site. Nesta would write .html
> files into your ./public folder. You could then move those .html files to
> your public server.
>
> It would be easier to just deploy to Heroku though, if you're not tied to
> a specific hosting platform…
>
> Graham

Re: [nesta] if i can push to heroku, can i deploy a static site like a static generator?

From:
Graham Ashton
Date:
2011-11-19 @ 14:08
On 19 Nov 2011, at 13:36, ray delgado wrote:

> Its just folder on a shared network.  I've created a tutorial website 
using 'The Middleman'.  However, I'll be adding guides more often and they
all need to be relatively linked because I have the navigation in the one 
layout shared by all templates.
> 
> Any help on writing this script that writes to a ./public folder?

Are you on a unix derivative, able to run shell scripts?

Re: [nesta] if i can push to heroku, can i deploy a static site like a static generator?

From:
ray delgado
Date:
2011-11-19 @ 14:36
No, sadly im on a Windows 7 machine.

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

On Sat, Nov 19, 2011 at 9:08 AM, Graham Ashton <graham@effectif.com> wrote:

> On 19 Nov 2011, at 13:36, ray delgado wrote:
>
> > Its just folder on a shared network.  I've created a tutorial website
> using 'The Middleman'.  However, I'll be adding guides more often and they
> all need to be relatively linked because I have the navigation in the one
> layout shared by all templates.
> >
> > Any help on writing this script that writes to a ./public folder?
>
> Are you on a unix derivative, able to run shell scripts?
>

Re: [nesta] if i can push to heroku, can i deploy a static site like a static generator?

From:
Graham Ashton
Date:
2011-11-22 @ 19:58
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-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