git clone https://github.com/chenh19/Quarto.git
Tutorial
1. Setup workspace
If you happen to use Debian Linux (KDE), which is my wife’s least hated linux distro, you may use “MyWorkspace” to configure the entire workspace.
If you use other Unix/Linux systems, you may use “git_ssh” to connect to GitHub with SSH, and “alt_rm” to replace the default
rm
just in case.
2. Install Quarto
3. Create a new GitHub repository
- Enter the repository name, keep the default initializing settings, then click “Create repository”:
- After creating the repository, you will see the following (copy the SSH link, you will need it in the next step):
- For more information: Creating a new GitHub repository from the web UI.
4. Download the Quarto template
- In a desired directory, clone the Quarto template repository:
- Rename the repository as you like (replace the “
<Project>
” with your project name):
mv Quarto <Project> && cd <Project> && rm -rf .git && git init
- Connect this local repository with your GitHub remote repository (replace the “
<user>/<repository.git>
” with your SSH link):
git remote add origin git@github.com:<user>/<repository.git>
5. Modify it as you like
- Modify the
_quarto.yml
file for your website:
- Make your
.Rmd/.qmd/.ipynb
notes:
- Render the new
.Rmd/.qmd/.ipynb
notes:
quarto render analysis
You may check the html files in the
./docs
folder to see if everything looks good.For more information: Quarto Guide: Creating a Website.
6. Upload the website to your GitHub repository
- Add, commit, and push to your GitHub:
git add --all && git commit -a -m "update" && git push -u origin main
7. Enable GibHub Pages and edit repository details
- Go to the “Settings” tab on your repository, go to “Pages” and in the “Branch” setting, select “main” and “/docs”, then click “Save”:
- On your repository page, click the gear in the top right:
- Enter the website link for your convenience (the default link is
https://<user>.github.io/<repository>/
), and click “Save changes”:
8. Done!
- Congratulations, you have made a website!