Code for nkthanh.dev
- NodeJS >= 17
- NextJS >= 13
$ npm run install
Run the website locally
$ npm run dev
Run automatic code formatting:
$ npm run lint
Build website
$ npm run build
The run on production
$ npm run start
All configuration is in next.config.js
and next-i18next.config.js
.
Variable | Description | Default |
---|---|---|
.i18n | You can config what languages you want to support on your site, checkout next-i18next.config.js . |
en |
.publicRuntimeConfig.utterancRepo | Website use utterances for comment system, which is show on bottom of the page. If visitors comment on a page, utterances-bot will create a new issue on markdown file of this page. |
|
.publicRuntimeConfig.theme | Theme color can switched between light and dark . |
light |
.publicRuntimeConfig.socials | These are socials link of yours. You can config title and link and then they are shown on top-right of all pages. |
[] |
.publicRuntimeConfig.navs | These are categories link of your website. They are placed on top-center of pages. | |
.images | If you use external image resources like medium,... I must append resource to .images to display images. |
[] |
You can view detail NextJS configuration here
My website is deployed automatically by Vercel.
If you want to self-deploy, you only need to do:
- build application
$ npm run install
$ npm run build
- start application
$ npm run start
- Code is licensed under MIT.
- Writings are my own.