About three years ago, I built a blog website on Github using jekyll, now I want to re-start, so I asked Gemini 3 to help me. I followed its instructions and successfully built it.
1. Archive previous site
- Go to your existing repository on GitHub.
- Click Settings -> General.
- Rename the repository to something like blog-archive-jekyll.
- Create a new repository named sunjh22.github.io.
2. Create new repository
- Create a new repository named sunjh22.github.io.
- Initialize it with a README.md.
- Go to Settings > Pages and set the “Source” to Deploy from a branch -> main -> /docs. (We will configure Quarto to render to a /docs folder).
3. Download and install Quarto
wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.8.26/quarto-1.8.26-linux-amd64.tar.gz
tar -xzf quarto-1.8.26-linux-amd64.tar.gz
ln -s /home/sunjh/data/biosoft/quarto-1.8.26/bin/quarto ~/data/bin/4. Initialize the Project
git clone https://github.com/sunjh22/sunjh22.github.io.git
cd sunjh22.github.io
quarto create-project myblog --type website:blog
mv myblog/* .
mv myblog/.gitignore .
rmdir myblog5. Configure for GitHub Pages
Edit _quarto.yml, index.qmd and about.qmd. All the new posts should be under ‘posts/’ directory, make three sub-directories ‘posts/bioinfo’, ‘posts/life’ and ‘posts/daily’.
6. Preview and Publish
# Because the port restriction, preview function is not available now.
quarto preview
# Render the full site
quarto render
# Push to Github
git add .
git commit -m "Initial commit"
git push origin mainBonus for git push
- Check for existing SSH keys:
ls -al ~/.ssh
If you see id_ed25519.pub or id_rsa.pub, skip to step 3.- Generate a new SSH key:
ssh-keygen -t ed25519 -C "your_email@example.com"(Press Enter through all prompts to accept defaults).
- Add the key to GitHub: Display your public key:
cat ~/.ssh/id_ed25519.pub
# Or cat ~/.ssh/id_rsa.pubCopy the output (starts with ssh-ed25519…). Go to GitHub Settings → SSH and GPG keys → New SSH key. Paste the key and save.
- Switch your repository to use SSH: Currently, your repo is looking for the HTTPS link. You need to point it to the SSH link.
# Change remote URL from HTTPS to SSH
git remote set-url origin git@github.com:sunjh22/sunjh22.github.io.git
# Verify it changed
git remote -v
# Should show: origin git@github.com:sunjh22/sunjh22.github.io.git (fetch)- Push:
git push origin main