`next export` (static builds) · Issue #604 · zeit/next.js · GitHub

#staticsitegen under consideration by @zeithq -  sweet!
 #ssg #reactjs #blog

  • From my understanding, zeit:now will still wrap static sites in a node.js app (zeit:serve) – and zeit:now even trumps most static deployment options anyway.
  • How about if we ignore getInitialProps for the static build.
  • static sites where each page is then assisted by client-side rendering (requiring some javascript) – e.g. single page web apps
  • static sites where certain pages or abilities require client-side rendering (needing some javascript)
  • balupton commented Jan 15, 2017 edited

next.js – Framework for server-rendered React apps

@bguiz: #staticsitegen under consideration by @zeithq – sweet!
#ssg #reactjs #blog

This might be built in (if it’s not too opinionated), or a separate “core module” (if it has too many “options”).

directory that doesn’t require a server.

for the static build.

We simply ignore that.

Is that something we could consider?

is a possibility.

defeat the purpose of a static site? There would still be a need for a server to get those initial props right? Or did I maybe miss something in the previous discussion?

There are two forms of static sites. The one where the data is 100% static, and the one where it’s not. And there’s a hybrid where you ship props pre-computed with each page and data can still be fetched dynamically

feature to generate a truly static site, otherwise I’ll have to open another feature request once it is finished 😉

There are two forms of static sites. The one where the data is 100% static, and the one where it’s not. And there’s a hybrid where you ship props pre-computed with each page and data can still be fetched dynamically

What type of static site is this command planning on exporting?

Let’s perhaps define them these ways:

Also, what exactly is the benefit of zeit:next exporting a static site?

From my understanding, zeit:now will still wrap static sites in a node.js app (zeit:serve) – and zeit:now even trumps most static deployment options anyway.

Also, what exactly is the benefit of zeit:next exporting a static site?

@balupton Allows one to host on github pages, aws s3, etc.

As an alternative, I tried to get the static content using wget. Although it works with other of my projects (without using next), it does not work well here with next.

@jferrettiboke @stretchkennedy Where internal links are unknown at “build time”, I think the approach used by static-site-generator-webpack-plugin where you simply list all of the URLs it needs to render in one place, works quite well.

Of course you don’t want to be doing this by hand – I have a script that does this based on matching file names within a directory: find-posts

( Continuing conversation here from #604 )

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

`next export` (static builds) · Issue #604 · zeit/next.js · GitHub