|
| 1 | +# ✨ Fjord Nextjs Theme ✨ |
| 2 | + |
| 3 | +This is Stackbit's "Fjord" theme built with [Next.js](https://nextjs.org/) and |
| 4 | +powered by content stored in files. |
| 5 | + |
| 6 | +Click the button below to create a new website from this theme using Stackbit: |
| 7 | + |
| 8 | +<p align="center"> |
| 9 | + <a href="https://app.stackbit.com/create?theme=https://github.com/stackbit-themes/fjord-nextjs&utm_source=theme-readme&utm_medium=referral&utm_campaign=stackbit_themes"><img alt="Create with Stackbit" src="https://assets.stackbit.com/badge/create-with-stackbit.svg"/></a> |
| 10 | +</p> |
| 11 | + |
| 12 | +[Live Site Demo](https://themes.stackbit.com/demos/fjord/) |
| 13 | + |
| 14 | +<img src="https://themes.stackbit.com/images/fjord-demo-1024x768.png" width="600"> |
| 15 | + |
| 16 | +The theme can be used to create a static website that is hosted by a serverless |
| 17 | +deployment platform such as [Netlify](https://www.netlify.com). The contents of |
| 18 | +the website are stored in git with the rest of the site's code. |
| 19 | + |
| 20 | +When deploying the website, [Sourcebit](https://github.com/stackbithq/sourcebit) |
| 21 | +reads the site's contents from files and provides it to Next.js. Once Next.js |
| 22 | +finishes generating the static website, [Netlify](https://www.netlify.com) pushes |
| 23 | +the static files to its CDN. |
| 24 | + |
| 25 | +[Sourcebit](https://github.com/stackbithq/sourcebit) and its plugins, specifically |
| 26 | +[`sourcebit-source-filesystem`](https://github.com/stackbithq/sourcebit-source-filesystem) |
| 27 | +and [`sourcebit-target-next`](https://github.com/stackbithq/sourcebit-target-next), |
| 28 | +are used to read the site's contents from files, normalize it, and provide it to |
| 29 | +Next.js pages. It also sets up live updates in development mode allowing you to |
| 30 | +update the content files and instantly see your updates in the browser. |
| 31 | + |
| 32 | + |
| 33 | +## Quick Start 🏎 |
| 34 | + |
| 35 | +[Create a site](https://app.stackbit.com/create?theme=https://github.com/stackbit-themes/fjord-nextjs&utm_source=theme-readme&utm_medium=referral&utm_campaign=stackbit_themes) from this theme using Stackbit. |
| 36 | + |
| 37 | +Stackbit will execute following steps for you |
| 38 | + |
| 39 | +- Create a new GitHub repository with the contents of this repository. |
| 40 | +- Create [Netlify](https://www.netlify.com) site connected to the GitHub repo |
| 41 | +- Deploy the Netlify site. |
| 42 | +- Create a "commit" webhook in GitHub that will trigger Netlify deployment as |
| 43 | + soon as new commit is pushed to GitHub. |
| 44 | +- Create a Stackbit project that will allow you edit your website via on-page |
| 45 | + visual editing experience. |
| 46 | + |
| 47 | + |
| 48 | +## Editing Content 📝 |
| 49 | + |
| 50 | +Once Stackbit creates a site, you can start editing the content using the free |
| 51 | +on-page editing experience provided by the [Stackbit Studio](https://stackbit.com?utm_source=project-readme&utm_medium=referral&utm_campaign=user_themes). |
| 52 | + |
| 53 | +[](https://stackbit.link/project-readme-lead-video) |
| 54 | + |
| 55 | +Here's a few resources to get you started: |
| 56 | + |
| 57 | +- 📺 [Editing Content](https://stackbit.link/project-readme-editing-video) |
| 58 | +- 📺 [Adding, Reordering and Deleting Items](https://stackbit.link/project-readme-adding-video) |
| 59 | +- 📺 [Collaboration](https://stackbit.link/project-readme-collaboration-video) |
| 60 | +- 📺 [Publishing](https://stackbit.link/project-readme-publishing-video) |
| 61 | +- 📚 [Stackbit Documentation](https://stackbit.link/project-readme-documentation) |
| 62 | + |
| 63 | +If you need a hand, make sure to check the [Stackbit support page](https://stackbit.link/project-readme-support). |
| 64 | + |
| 65 | + |
| 66 | +## Develop Locally |
| 67 | + |
| 68 | +1. [Create a site](https://app.stackbit.com/create?theme=https://github.com/stackbit-themes/fjord-nextjs&utm_source=theme-readme&utm_medium=referral&utm_campaign=stackbit_themes) from this theme using Stackbit. |
| 69 | + |
| 70 | +1. Once finished, you will be redirected to Stackbit Studio where you will be |
| 71 | + able to edit the content using the free on-page editing experience, and |
| 72 | + publish new versions of your site. |
| 73 | + |
| 74 | +1. To further develop your site, clone the generated repository. |
| 75 | + |
| 76 | +1. Install dependencies |
| 77 | + |
| 78 | + npm install |
| 79 | + |
| 80 | +1. Start the Next.js local development server: |
| 81 | + |
| 82 | + npm run develop |
| 83 | + |
| 84 | +1. Open [http://localhost:3000/](http://localhost:3000/) in the browser to see |
| 85 | + your site. You can now edit the site contents, and the browser will |
| 86 | + live-update your changes. 🎉 |
| 87 | + |
| 88 | + |
| 89 | +## Building for production 🏗 |
| 90 | + |
| 91 | +To build a static site for production, or test locally how it works, run the |
| 92 | +following command: |
| 93 | + |
| 94 | + npm run build |
| 95 | + |
| 96 | +The exported site will be written to `out` folder. The contents of this folder |
| 97 | +can be deployed by serverless deployment platform such as [Netlify](https://www.netlify.com). |
| 98 | +You can start a local server serving the static files from the `out` folder, for |
| 99 | +example by installing and running `http-server`: |
| 100 | + |
| 101 | + npm install http-server -g |
| 102 | + http-server out |
0 commit comments