Repository: netlify-templates/next-netlify-starter Branch: main Commit: b306609505d7 Files: 14 Total size: 7.3 KB Directory structure: gitextract_sndermd8/ ├── .gitignore ├── LICENSE ├── README.md ├── components/ │ ├── Footer.js │ ├── Footer.module.css │ └── Header.js ├── jsconfig.json ├── netlify.toml ├── next.config.js ├── package.json ├── pages/ │ ├── _app.js │ └── index.js ├── renovate.json └── styles/ └── globals.css ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # next.js /.next/ /out/ # production /build # misc .DS_Store # debug npm-debug.log* yarn-debug.log* yarn-error.log* # local env files .env.local .env.development.local .env.test.local .env.production.local # Local Netlify folder .netlify ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2024 netlify-templates Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # Next + Netlify Starter [![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) This is a [Next.js](https://nextjs.org/) v16 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://www.netlify.com/)! 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. [![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) (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) ## Table of Contents: - [Getting Started](#getting-started) - [Installation options](#installation-options) - [Testing](#testing) - [Included Default Testing](#included-default-testing) - [Removing Renovate](#removing-renovate) ## Getting Started First, run the development server: ```bash npm run dev # or yarn dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. ### Installation options **Option one:** One-click deploy [![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) **Option two:** Manual clone 1. Clone this repo: `git clone https://github.com/netlify-templates/next-netlify-starter.git` 2. Navigate to the directory and run `npm install` 3. Run `npm run dev` 4. Make your changes 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) ## Testing ### Included Default Testing We’ve included some tooling that helps us maintain these templates. This template currently uses: - [Renovate](https://www.mend.io/free-developer-tools/renovate/) - to regularly update our dependencies - [Cypress](https://www.cypress.io/) - to run tests against how the template runs in the browser - [Cypress Netlify Build Plugin](https://github.com/cypress-io/netlify-plugin-cypress) - to run our tests during our build process If your team is not interested in this tooling, you can remove them with ease! ### Removing Renovate 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. ================================================ FILE: components/Footer.js ================================================ import styles from './Footer.module.css' export default function Footer() { return ( <> ) } ================================================ FILE: components/Footer.module.css ================================================ .footer { width: 100%; height: 100px; border-top: 1px solid #eaeaea; display: flex; justify-content: center; align-items: center; } .logo { height: 3em; margin: 5px; } ================================================ FILE: components/Header.js ================================================ export default function Header({ title }) { return

{title}

} ================================================ FILE: jsconfig.json ================================================ { "compilerOptions": { "baseUrl": "./", "paths": { "@components/*": ["components/*"], "@styles/*": ["styles/*"] } } } ================================================ FILE: netlify.toml ================================================ [build] command = "npm run build" publish = ".next" ================================================ FILE: next.config.js ================================================ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true }; module.exports = nextConfig; ================================================ FILE: package.json ================================================ { "name": "next-netlify-starter", "version": "0.5.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "export": "next build && next export" }, "dependencies": { "next": "^16.0.7", "react": "^19.2.1", "react-dom": "^19.2.1" } } ================================================ FILE: pages/_app.js ================================================ import '@styles/globals.css' function Application({ Component, pageProps }) { return } export default Application ================================================ FILE: pages/index.js ================================================ import Head from 'next/head' import Header from '@components/Header' import Footer from '@components/Footer' export default function Home() { return (
Next.js Starter!

Get started by editing pages/index.js

) } ================================================ FILE: renovate.json ================================================ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "local>netlify-templates/renovate-config" ] } ================================================ FILE: styles/globals.css ================================================ html, body { background-color: #f8fafc; padding: 0; margin: 0; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; } * { box-sizing: border-box; } main { padding: 5rem 0; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; } code { background: #e2e8f0; border-radius: 5px; padding: 0.75rem; font-family: Menlo, Monaco, Lucida Console, Courier New, monospace; } .container { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }