Skip to content

tyrelh/personal-site-nextjs

main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Personal site source

Source code for my personal website. Check it out at superflux.dev

Stack

  • Next.js
  • React
  • TypeScript
  • Ant Design
  • marked (parsing markdown)
  • grey-matter (parsing front-matter from markdown)

Develop

npm install

npm run dev

Deploy

Make 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.git

Build the static site first:

npm run build

Then run the deploy:

npm run deploy

The 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 deploy script in the package.json with the domain you use, or remove that echo entirely 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-pages command to push to your GitHub Pages repo. A few flags are used. -d out tells it which directory should be deployed. -b master tells it to which branch on the remote should be deployed to. -f forces the push to the remote, overwriting changes that may exist there. -t tells it to include dotfiles, necessary for the .nojekyll file.

About

Personal website built with Next.js, React, and TypeScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages