Skip to content

Commit 65bac29

Browse files
committed
Update to Next.js App Router
1 parent fd2b23a commit 65bac29

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+8843
-7335
lines changed

Diff for: .babelrc

-3
This file was deleted.

Diff for: .eslintignore

-3
This file was deleted.

Diff for: .eslintrc.json

+1-45
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,3 @@
11
{
2-
"parser": "@typescript-eslint/parser",
3-
"plugins": ["@typescript-eslint"],
4-
"extends": [
5-
"eslint:recommended",
6-
"plugin:react/recommended",
7-
"plugin:@typescript-eslint/recommended"
8-
// Uncomment the following lines to enable eslint-config-prettier
9-
// Is not enabled right now to avoid issues with the Next.js repo
10-
// "prettier",
11-
],
12-
"env": {
13-
"es6": true,
14-
"browser": true,
15-
"jest": true,
16-
"node": true
17-
},
18-
"settings": {
19-
"react": {
20-
"version": "detect"
21-
}
22-
},
23-
"rules": {
24-
"react/react-in-jsx-scope": 0,
25-
"react/display-name": 0,
26-
"react/prop-types": 0,
27-
"@typescript-eslint/explicit-function-return-type": 0,
28-
"@typescript-eslint/explicit-member-accessibility": 0,
29-
"@typescript-eslint/indent": 0,
30-
"@typescript-eslint/member-delimiter-style": 0,
31-
"@typescript-eslint/no-explicit-any": 0,
32-
"@typescript-eslint/no-var-requires": 0,
33-
"@typescript-eslint/no-use-before-define": 0,
34-
"@typescript-eslint/no-unused-vars": [
35-
2,
36-
{
37-
"argsIgnorePattern": "^_"
38-
}
39-
],
40-
"no-console": [
41-
2,
42-
{
43-
"allow": ["warn", "error"]
44-
}
45-
]
46-
}
2+
"extends": "next/core-web-vitals"
473
}

Diff for: .gitignore

+8-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ yarn-debug.log*
2525
yarn-error.log*
2626

2727
# local env files
28-
.env.local
29-
.env.development.local
30-
.env.test.local
31-
.env.production.local
28+
.env*.local
3229

3330
# vercel
3431
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts
36+
37+
# contentlayer
38+
.contentlayer

Diff for: .prettierignore

-5
This file was deleted.

Diff for: .prettierrc

-4
This file was deleted.

Diff for: README.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22

33
A Next.js starter for your next blog or personal site. Built with:
44

5-
- [Typescript](https://www.typescriptlang.org/)
5+
- Next.js App Router
6+
- Content processing with [Contentlayer](https://www.contentlayer.dev/)
67
- Write posts with [MDX](https://mdxjs.com/)
78
- Style with [Tailwind CSS](https://tailwindcss.com/)
8-
- Linting with [ESLint](https://eslint.org/)
9-
- Formatting with [Prettier](https://prettier.io/)
10-
- Linting, typechecking and formatting on by default using [`husky`](https://github.com/typicode/husky) for commit hooks
11-
- Testing with [Jest](https://jestjs.io/) and [`react-testing-library`](https://testing-library.com/docs/react-testing-library/intro)
129

13-
This Starter is **heavily** inspired by [Lee Robinson](https://github.com/leerob/leerob.io) and [Anson Lichtfuss](https://github.com/ansonlichtfuss/website).
10+
This Starter is **heavily** inspired by [Lee Robinson](https://github.com/leerob/leerob.io).
1411

1512
👀 [View the Live Demo](https://nextjs-typescript-mdx-blog.vercel.app/)
1613

@@ -20,13 +17,15 @@ This Starter is **heavily** inspired by [Lee Robinson](https://github.com/leerob
2017
git clone https://github.com/ChangoMan/nextjs-typescript-mdx-blog.git
2118
cd nextjs-typescript-mdx-blog
2219

23-
yarn install
24-
# or
2520
npm install
2621

27-
yarn dev
28-
# or
2922
npm run dev
3023
```
3124

3225
Your new site will be up at http://localhost:3000/
26+
27+
Blog posts can be added to the `posts` directory, in the root folder.
28+
29+
Update the `WEBSITE_HOST_URL` when taking your site live. This lives in `/src/lib/constants.ts`
30+
31+
Make sure to update the `sitemap.ts` file, specifically the `const routes` if you add more pages to the website.

Diff for: components/Head.tsx

-42
This file was deleted.

Diff for: components/Layout.tsx

-44
This file was deleted.

Diff for: components/Navigation.tsx

-17
This file was deleted.

Diff for: components/ThemeSwitch.tsx

-107
This file was deleted.

0 commit comments

Comments
 (0)