Skip to content

Commit 832834d

Browse files
committed
Initial commit
0 parents  commit 832834d

17 files changed

+671
-0
lines changed

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18

README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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/) v14 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. With Netlify, you'll have access to features like Preview Mode, server-side rendering/incremental static regeneration via Netlify Functions, and internationalized routing on deploy automatically.
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+
## Table of Contents:
14+
15+
- [Getting Started](#getting-started)
16+
- [Installation options](#installation-options)
17+
- [Testing](#testing)
18+
- [Included Default Testing](#included-default-testing)
19+
- [Removing Renovate](#removing-renovate)
20+
21+
## Getting Started
22+
23+
First, run the development server:
24+
25+
```bash
26+
npm run dev
27+
# or
28+
yarn dev
29+
```
30+
31+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
32+
33+
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
34+
35+
### Installation options
36+
37+
**Option one:** One-click deploy
38+
39+
[![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)
40+
41+
**Option two:** Manual clone
42+
43+
1. Clone this repo: `git clone https://github.com/netlify-templates/next-netlify-starter.git`
44+
2. Navigate to the directory and run `npm install`
45+
3. Run `npm run dev`
46+
4. Make your changes
47+
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)
48+
49+
## Testing
50+
51+
### Included Default Testing
52+
53+
We’ve included some tooling that helps us maintain these templates. This template currently uses:
54+
55+
- [Renovate](https://www.mend.io/free-developer-tools/renovate/) - to regularly update our dependencies
56+
- [Cypress](https://www.cypress.io/) - to run tests against how the template runs in the browser
57+
- [Cypress Netlify Build Plugin](https://github.com/cypress-io/netlify-plugin-cypress) - to run our tests during our build process
58+
59+
If your team is not interested in this tooling, you can remove them with ease!
60+
61+
### Removing Renovate
62+
63+
In order to keep our project up-to-date with dependencies we use a tool called [Renovate](https://github.com/marketplace/renovate). If you’re not interested in this tooling, delete the `renovate.json` file and commit that onto your main branch.

components/Footer.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import styles from './Footer.module.css'
2+
3+
export default function Footer() {
4+
return (
5+
<>
6+
<footer className={styles.footer}>
7+
<img src="/logo-netlify.svg" alt="Netlify Logo" className={styles.logo} />
8+
</footer>
9+
</>
10+
)
11+
}

components/Footer.module.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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: 3em;
12+
margin: 5px;
13+
}

components/Header.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function Header({ title }) {
2+
return <h1 className="title">{title}</h1>
3+
}

jsconfig.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": "./",
4+
"paths": {
5+
"@components/*": ["components/*"],
6+
"@styles/*": ["styles/*"]
7+
}
8+
}
9+
}

netlify.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build]
2+
command = "npm run build"
3+
publish = ".next"
4+
5+
[[plugins]]
6+
package = "@netlify/plugin-nextjs"

next.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
reactStrictMode: true,
4+
swcMinify: true
5+
};
6+
7+
module.exports = nextConfig;

0 commit comments

Comments
 (0)