The sample chapter is written in Quarto (.qmd) format and is located in chapters/version_control.qmd.
-
Download and install Quarto from https://quarto.org/docs/get-started/.
-
Clone the repository:
# Fork the repository # 1. Go to https://github.com/khuyentran1401/book-sample # 2. Click the "Fork" button in the top-right corner # 3. Select your GitHub account as the destination # Clone the repository git clone https://github.com/your-username/book-sample.git cd book-sample
-
Install uv by following the instructions here.
-
Create and activate virtual environment with uv:
uv venv # Activate the virtual environment source .venv/bin/activate # On Unix/macOS # or .venv\Scripts\activate # On Windows
-
Install dependencies:
uv sync
To contribute to the book, you can follow the steps below:
-
Set up the environment by following the Setting Up Your Environment section.
-
Edit the chapter in chapters/version_control.qmd using your favorite text editor. Please refer to the Quarto Markdown Basics Guide to learn how to write Quarto markdown.
-
Preview the book in your browser:
cd chapters quarto preview --no-navigateThe sample chapter will be available at http://localhost:6289/version_control.html.
-
Render the sample chapter to other formats:
- To PDF:
quarto render version_control.qmd --to pdf
- To docx:
quarto render version_control.qmd --to docx
The rendered PDF and docx will be available in the
_bookdirectory. -
Stage, commit, and push your changes:
# Stage all changes git add . # Or stage specific files git add path/to/file # Commit your changes with a descriptive message git commit -m "Your commit message" # Push your changes to the remote repository git push origin main
-
View this guide to create a pull request.