How to build and share a static site from scratch in 5 minutes. Install : vue-cli npm install -g vue-cli Create the project (replace by your project name): my-project vue init nuxt/starter my-projectcd my-projectnpm install Update to (replace by your project name): nuxt.config.js add a base URL my-project router: { base: '/my-project/' }, Install : push-dir npm install push-dir --save-dev Create a command to publish to by editing file and adding this line at the beginning of the section: deploy Github pages package.json script "deploy": "push-dir --dir=dist --branch=gh-pages --cleanup", Connect to your Github account and create an empty repository. Then commit and push your code to your repository (replace by your name and by your project name): me my-project git initgit add .git commit -m "init"git remote add origin https://github.com/me/my-project.gitgit push -u origin master Generate the site and publish it: npm run generatenpm run deploy Go to your site (replace by your name and by your project name) and . https://me.github.io/my-project me my-project enjoy the result You can publish your changes by running this again: npm run generatenpm run deploy 🤗 Voilà.
Share Your Thoughts