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.ts
to match your GitHub repository name:- Given the pattern
https://github.com/<user>/<repo>
- Update your
basePath
config to the name of your repo (e.g./repo
)
- Given the pattern
- Push the starter code to the
main
branch - Run the
deploy
script (e.g.npm run deploy
) to create thegh-pages
branch - On GitHub, go to Settings > Pages > Branch, and choose
gh-pages
as the branch with the/root
folder. Hit Save - Make a change
- Run the
deploy
script 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!