VueJS-Nuxt to Github Pages
VueJS/Nuxt to GitHub pages.
- On GitHub, navigate to your site’s repository and open up Settings.
- Enable Github Pages and set it to use the /docs subdirectory – this will make a CNAME file
- Set up a custom (sub)domain
- Open up DNS provider and make this record:
sub.domain.tld CNAME username.github.io
- Note: it can take 48 hours for this change to propagate
- Once the DNS is set up you can enforce HTTPS in Github settings
- Fetch/Pull the CNAME file into local repository
- Use
npm run generate
to generate the static website
- Copy the contents of the dist/ folder to docs/
- Push it up!
Sources:
- custom domain github pages instructions
10 Dec 2020