├── public ├── favicon.ico └── netliheart.svg ├── components ├── Header.js ├── Footer.module.css └── Footer.js ├── netlify.toml ├── renovate.json ├── pages ├── _app.js └── index.js ├── jsconfig.json ├── package.json ├── .gitignore ├── styles └── globals.css └── README.md /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spel/next-netlify-starter/main/public/favicon.ico -------------------------------------------------------------------------------- /components/Header.js: -------------------------------------------------------------------------------- 1 | export default function Header({ title }) { 2 | return

{title}

3 | } 4 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command = "npm run build" 3 | publish = ".next" 4 | 5 | [[plugins]] 6 | package = "@netlify/plugin-nextjs" -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "local>netlify-templates/renovate-config" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /pages/_app.js: -------------------------------------------------------------------------------- 1 | import '@styles/globals.css' 2 | 3 | function Application({ Component, pageProps }) { 4 | return 5 | } 6 | 7 | export default Application 8 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "./", 4 | "paths": { 5 | "@components/*": ["components/*"], 6 | "@styles/*": ["styles/*"] 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /components/Footer.module.css: -------------------------------------------------------------------------------- 1 | .footer { 2 | width: 100%; 3 | height: 100px; 4 | border-top: 1px solid #eaeaea; 5 | display: flex; 6 | justify-content: center; 7 | align-items: center; 8 | } 9 | 10 | .logo { 11 | height: 1em; 12 | margin: 5px; 13 | } 14 | -------------------------------------------------------------------------------- /components/Footer.js: -------------------------------------------------------------------------------- 1 | import styles from './Footer.module.css' 2 | 3 | export default function Footer() { 4 | return ( 5 | <> 6 | 9 | 10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "next-netlify-starter", 3 | "version": "0.5.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "export": "next export" 9 | }, 10 | "dependencies": { 11 | "next": "^12.0.7", 12 | "react": "^17.0.2", 13 | "react-dom": "^17.0.2" 14 | }, 15 | "devDependencies": { 16 | "@netlify/plugin-nextjs": "^4.0.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | 21 | # debug 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # local env files 27 | .env.local 28 | .env.development.local 29 | .env.test.local 30 | .env.production.local 31 | 32 | # Local Netlify folder 33 | .netlify 34 | -------------------------------------------------------------------------------- /pages/index.js: -------------------------------------------------------------------------------- 1 | import Head from 'next/head' 2 | import Header from '@components/Header' 3 | import Footer from '@components/Footer' 4 | 5 | export default function Home() { 6 | return ( 7 |
8 | 9 | Next.js Starter! 10 | 11 | 12 | 13 |
14 |
15 |

16 | Get started by editing pages/index.js 17 |

18 |
19 | 20 |
21 |
22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /styles/globals.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | padding: 0; 4 | margin: 0; 5 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, 6 | Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 7 | } 8 | 9 | * { 10 | box-sizing: border-box; 11 | } 12 | 13 | main { 14 | padding: 5rem 0; 15 | flex: 1; 16 | display: flex; 17 | flex-direction: column; 18 | justify-content: center; 19 | align-items: center; 20 | } 21 | 22 | code { 23 | background: #fafafa; 24 | border-radius: 5px; 25 | padding: 0.75rem; 26 | font-family: Menlo, Monaco, Lucida Console, Courier New, monospace; 27 | } 28 | 29 | .container { 30 | height: 100vh; 31 | display: flex; 32 | flex-direction: column; 33 | justify-content: center; 34 | align-items: center; 35 | } 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Next + Netlify Starter 2 | 3 | [![Netlify Status](https://api.netlify.com/api/v1/badges/46648482-644c-4c80-bafb-872057e51b6b/deploy-status)](https://app.netlify.com/sites/next-dev-starter/deploys) 4 | 5 | This is a [Next.js](https://nextjs.org/) v12 project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) and set up to be instantly deployed to [Netlify](https://url.netlify.com/SyTBPVamO)! 6 | 7 | This project is a very minimal starter that includes 2 sample components, a global stylesheet, a `netlify.toml` for deployment, and a `jsconfig.json` for setting up absolute imports and aliases. It also includes the [Essential Next.js Build Plugin](https://github.com/netlify/netlify-plugin-nextjs), which will allow for you to implement features like Preview Mode, server-side rendering/incremental static regeneration via Netlify Functions, and internationalized routing. 8 | 9 | [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/next-netlify-starter&utm_source=github&utm_medium=nextstarter-cs&utm_campaign=devex-cs) 10 | 11 | (If you click this button, it will create a new repo for you that looks exactly like this one, and sets that repo up immediately for deployment on Netlify) 12 | 13 | ## Getting Started 14 | 15 | First, run the development server: 16 | 17 | ```bash 18 | npm run dev 19 | # or 20 | yarn dev 21 | ``` 22 | 23 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 24 | 25 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. 26 | 27 | ### Installation options 28 | 29 | **Option one:** One-click deploy 30 | 31 | [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/next-netlify-starter&utm_source=github&utm_medium=nextstarter-cs&utm_campaign=devex-cs) 32 | 33 | **Option two:** Manual clone 34 | 35 | 1. Clone this repo: `git clone https://github.com/netlify-templates/next-netlify-starter.git` 36 | 2. Navigate to the directory and run `npm install` 37 | 3. Run `npm run dev` 38 | 4. Make your changes 39 | 5. Connect to [Netlify](https://url.netlify.com/Bk4UicocL) manually (the `netlify.toml` file is the one you'll need to make sure stays intact to make sure the export is done and pointed to the right stuff) 40 | -------------------------------------------------------------------------------- /public/netliheart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | --------------------------------------------------------------------------------