- Vite, frontend building tool to make the website easily.
- TSX, which is both Typescript(Strict Javascript for no errors) and HTML in the same file.
- React, this is the framework being used to use modules easily.
- Shadertoy, we're using a NPM module of this to use create a background with GLSL.
- Tailwind, this is a css framework to design websites quickly.
- React Router, this is what's needed to make a single page application.
- BrowserRouter isn't supported on GitHub while HashRouter is.
- HashRouter is all client-sided routing instead of server-sided.
- More information regarding HashRouter vs BrowserRouter
Both GitHub Pages and Cloudflare Pages offer free hosting for Single Page Applications. Single Page Applications are just websites with only one page with no reloading required to access other content (subpages in this case with routers).
- GitHub Pages requires public GitHub repositories.
- Cloudflare Pages allows private GitHub repositories.
- GitHub Pages
- Cloudflare Pages
-
You'll need to first upload a repository with GitHub.
-
I would recommend using GitHub desktop for this.
-
Then I would change the package.json to the website domain you're going to use.
-
GitHub: "username".github.io
-
Cloudflare: "repo-name".pages.dev
GitHub:
- Make sure to head to your repo settings -> Pages.
- Build and deployment should be from branch and root.
- If this doesn't work, then you may need a .github/workflows/deploy.yml GitHub Deploy.yml
Cloudflare:
- Build command: yarn build
- Build output directory: /./dist
This whole project is based off of @0b5vr portfolio website.
The background is based off of Shadertoy.
Either Yarn or NodeJS to install packages. Use CTRL+C to exit dev mode of each package manager if you ran it.
- Yarn <- What I'm using.
- NodeJS NPM
Installing the packages with Yarn.
yarn install
Running dev with Yarn.
yarn dev
Adding packages from NPM.
yarn add [NPM Package-Name with no brackets]
Installing the packages with NPM.
npm install
Running dev with NPM.
npm run dev
Adding packages with NPM.
npm i [NPM Package-Name with no brackets]
- ESLint
- Prettier
- Use NPM to get more modules for react!
- Make sure to have see a TS icon on the side of the name as well on NPM website!
yarn add [NPM Package]
yarn remove [NPM Package]
npm i [NPM Package]
npm uninstall [NPM Package]