Working with GitHub pages and Quarto to edit documentation
Using Quarto to write documentation in a GitHub repository
This documentation site is built using Quarto and hosted using GitHub Pages. The rationale for using this approach is summarised in Why Quarto.
How to contribute documentation
Edit in GitHub - for small changes
Here are the steps to make small edits directly in GitHub:
- Open the repository in github.com for this documentation site.
- Browse to the file
*.qmdfiles in your content folders.
- Click the pencil icon (“Edit this file”)
- GitHub opens an in-browser editor for that file.
- Make the change and commit
- Add a short commit message.
- Either commit directly to the main branch (if allowed) or create a new branch and open a pull request.
- Approval of change and deployment
- Your changes may need approval, which case a pull request will be set up and once approved the site will be automatically rebuilt.
Edit locally - for larger changes
One-time setup
- Clone the repository to your local machine
git clone https://github.com/Laboratory-of-Gene-Regulation-Oxford/bpe-doc.gitor clone using vs code git extension.
- Set up your local environment
- Follow any setup instructions specific to this repository.
- Install Quarto in vs-code
- Download and install the vs-code Quarto extension
Making changes
- Open the repository in your local editor
- Open the folder you cloned in your code editor (e.g., VS Code, RStudio).
- Edit the files
- Make changes to the
*.qmdfiles as needed.
- Make changes to the
- Preview your changes
- Use Quarto’s preview features to see how your changes will look.
- Commit and push your changes
- Use git to commit your changes with a descriptive message.
- Push your changes to your fork or branch on GitHub.
- Create a pull request
- Open a pull request on GitHub to propose your changes for review.
- Approval of change and deployment
- Once your pull request is approved, the site will be automatically rebuilt and your changes will go live.
Quarto
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see https://quarto.org.