This is a Next.js template which can be deployed to GitHub Pages as a static site.
- Create a new public GitHub repository
- Edit
next.config.tsto match your GitHub repository name:- Given the pattern
https://github.com/<user>/<repo> - Update your
basePathconfig to the name of your repo (e.g./repo)
- Given the pattern
- Push the starter code to the
mainbranch - Run the
deployscript (e.g.npm run deploy) to create thegh-pagesbranch - On GitHub, go to Settings > Pages > Branch, and choose
gh-pagesas the branch with the/rootfolder. Hit Save - Make a change
- Run the
deployscript again to push the changes to GitHub Pages
Congratulations! You should have a URL like:
https://<github-user-name>.github.io/<github-project-name>/For more information, see our deployment documentation.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!