Don't miss the first part ! • Learn the basics to code a stunning 3...
In this second part, learn how to put your 3D website online! We'll be using Github Pages, which lets you host a website for free as long as you keep your code opensource. Build the website for deployment using Vite, which will create a javascript bundle. Create a github repository linked to your local folder, which we synchronize by pushing or pulling commits. Finally, get the link to your website hosted on github pages.
Git initialization :
1. git init
2. git add .
3. git commit m "add: initial files"
4. git branch M main
5. git remote add origin https://github.com/[USER]/[REPO_NAME]
6. git push u origin main
Vite.config.js :
import { defineConfig } from 'vite'
export default defineConfig{(
base: "/[REPO]/"
})
Vite : Deploy a Static Site Github Pages :
https://vitejs.dev/guide/staticdeploy