Skip to content

Commit

Permalink
chore: upgrade v5
Browse files Browse the repository at this point in the history
  • Loading branch information
vhnam committed Jun 15, 2023
1 parent 9cbb4b7 commit 66f9b2f
Show file tree
Hide file tree
Showing 1,334 changed files with 8,195 additions and 54,259 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
29 changes: 18 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
package-lock.json
/.pnp
.pnp.js

# testing
/coverage

# development
/.sass-cache
# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
*.pem

# log
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

#ide
.vscode
.idea
# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

19 changes: 0 additions & 19 deletions .prettierrc

This file was deleted.

84 changes: 0 additions & 84 deletions 404.html

This file was deleted.

67 changes: 22 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,38 @@
# Nam Vo's blog
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Development
## Getting Started

```
npm run scss
```

## Post a content

#### 1. create content folder
First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```
mkdir src/content/blog/<TITLE> # for blog
cd src/content/blog/<TITLE>

mkdir src/content/tutorial/<TITLE> # for tutorial
cd src/content/tutorial/<TITLE>
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

#### 2. create images folder
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

```
mkdir img
```
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

#### 3. create metadata file
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

```
touch config.json
```
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

```json
{
"headline": "",
"description": "",
"time": "Ngày <DAY> tháng <MONTH> năm <YEAR>",
"dateTime": "<YEAR>-<MONTH>-<DAY>"
}
```
## Learn More

#### 4. create index.html
To learn more about Next.js, take a look at the following resources:

```
touch index.html
```
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

#### 5. Writing
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

You should copy content of other file in `/src/content/blog/**/index.html` or `/src/content/tutorials/**/index.html`
## Deploy on Vercel

#### 6. Build
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

```
npm run build
cd ../../../scripts
python posts.py --tutorial # for tutorial
python posts.py --blog # for blog
python index.py
python sitemap.py
```
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Loading

0 comments on commit 66f9b2f

Please sign in to comment.