diff --git a/dynamic-routes-starter/posts/first-post.md b/dynamic-routes-starter/posts/first-post.md deleted file mode 100644 index 4bd671e..0000000 --- a/dynamic-routes-starter/posts/first-post.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "First Post" -date: "2020-01-01" ---- - -This is the first post! - -It uses the [Static Generation](https://nextjs.org/docs/basic-features/pages) feature of Next.js. \ No newline at end of file diff --git a/dynamic-routes-starter/posts/pre-rendering.md b/dynamic-routes-starter/posts/pre-rendering.md new file mode 100644 index 0000000..78cc081 --- /dev/null +++ b/dynamic-routes-starter/posts/pre-rendering.md @@ -0,0 +1,11 @@ +--- +title: "Two Forms of Pre-rendering" +date: "2020-01-01" +--- + +[Next.js](https://nextjs.org/) has two forms of pre-rendering: **Static Generation** and **Server-side Rendering**. The difference is in **when** it generates the HTML for a page. + +- **Static Generation (Recommended)**: The HTML is generated at **build time** and will be reused on each request. +- **Server-side Rendering**: The HTML is generated on **each request**. + +Importantly, Next.js lets you **choose** which pre-rendering form you'd like to use for each page. You can create a "hybrid" Next.js app by using Static Generation for most pages and using Server-side Rendering for others. \ No newline at end of file