This project was inspired by VuePress, but based on Nuxt.js
Supporting nuxt universal mode and static hosting
This side project using the following packages:
At first, you should create .env
file at root directory.
The following environment variables are necessary:
BASE_URL=http://localhost:3000
GTM_ID=GTM-XXX
GOOGLE_SITE_VERIFICATION=XXXXXXXXXXXXXXXXXXXXX
If you don't need GTM_ID
and GOOGLE_SITE_VERIFICATION
, you can turn off in nuxt.config.js
Before you generate static html by script yarn generate
, you should run script yarn start
for running the backend API.
# install dependencies
$ yarn install
# serve with hot reload at localhost:3000
$ yarn dev
# build for production and launch server
$ yarn build
$ yarn start
# generate static project
$ yarn generate
You can easily deploy this project by using Vercel (It was called Zeit before)
# deploy preview application
$ now
# deploy to production
$ now --prod
You have to set the environment variables in your Vercel project