Website Hosting

Preparation

  1. Download Template (Rename CNAME file with your website's domain name).
  2. Sign up for GitHub (or any other static web hosting services).
  3. Sign up for Cloudflare (or any other security services).
  4. Optional: Sign up for Porkbun (or any other DNS hosts).
  5. Download Visual Studio Code or Vim (or any other IDEs).

Set Up Local Development

  1. Set up a test Python server for editing:
    • python3 -m http.server (http://localhost:8000/)
  2. Link local files to GitHub repo through Git and SSH:
    • ssh-keygen -t ed25519 -C "your_email@example.com"
    • eval "$(ssh-agent -s)"
    • ssh-add ~/.ssh/id_ed25519
    • cat ~/.ssh/id_ed25519.pub

Git Commands

  1. Initialize and push your repository:
    • git init
    • git add .
    • git commit -m "message here"
    • git push -u origin main
    • git remote set-url origin git@github.com:githuburlprojectname.git

Set Up GitHub Pages

  1. Enable GitHub Pages:
    • Custom domain
    • Enforce HTTPS
  2. Optional: Buy a domain through Porkbun and link it to GitHub:
    • Delete ALIAS
    • Delete CNAME