Source code for my personal website. Check it out at superflux.dev
- Next.js
- React
- TypeScript
- Ant Design
- marked (parsing markdown)
- grey-matter (parsing front-matter from markdown)
npm install
npm run compile-search-index
npm run devMake sure to set your origin remote to the remote of your github pages repo. In my case to tyrelh.github.io. Or you can customize the remote that is deployed to. See gh-pages docs for more info.
# either add a new remote
git remote add origin https://github.com/tyrelh/tyrelh.github.io.git
# or update existing origin remote
git remote set-url origin https://github.com/tyrelh/tyrelh.github.io.gitBuild the static site first:
npm run buildThen run the deploy:
npm run deployThe deploy script will do a couple things
- It will output a _CNAME_gs file to the static assets directory. This is neccessary to configure GitHub Pages with a custom domain. Make sure to edit the
deployscript in the package.json with the domain you use, or remove thatechoentirely if you're not using a custom domain. - It will output a .nojekyll file to the static assets directory. This is neccessary to configure GitHub Pages to work with a Next.js site. It tells GitHub to not ignore files and directories beginning with
_. - Then it uses the
gh-pagescommand to push to your GitHub Pages repo. A few flags are used.-d outtells it which directory should be deployed.-b mastertells it to which branch on the remote should be deployed to.-fforces the push to the remote, overwriting changes that may exist there.-ttells it to include dotfiles, necessary for the .nojekyll file.