-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,334 changed files
with
8,195 additions
and
54,259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.