Skip to content

Commit 7e01491

Browse files
committed
Add README files
1 parent ae096a0 commit 7e01491

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Demo Quarto Website with Figure Submodule
2+
3+
This repository demonstrates how to keep your main Quarto website repository lightweight by storing generated figures in a separate git submodule.
4+
5+
## Repository Structure
6+
7+
```default
8+
├── _quarto.yml # Site configuration
9+
├── index.qmd # Homepage
10+
├── posts/ # Blog posts
11+
│ └── welcome/
12+
│ └── index.qmd
13+
└── figures/ # Git submodule (external repository)
14+
└── post-figures/
15+
├── plot1.png
16+
└── plot2.png
17+
```
18+
19+
## Usage
20+
21+
This repository is designed to be used as the main repository of a Quarto website/blog project. Figures are automatically generated by Quarto documents when they are rendered with proper `fig.path` configuration into the `figures/` submodule.
22+
23+
### Clone with Submodules
24+
25+
You need to clone the repository with its submodule to ensure the `figures/` directory is included.
26+
27+
```bash
28+
# Clone including the figures submodule
29+
git clone --recursive https://github.com/coatless-tutorials/demo-figure-quarto-website.git
30+
31+
# Or if already cloned
32+
git submodule update --init --recursive
33+
```
34+
35+
### Local Development
36+
37+
You can view the Quarto website locally using the following commands:
38+
39+
```bash
40+
# Preview the website
41+
quarto preview
42+
43+
# Render the site
44+
quarto render
45+
```
46+
47+
## What's going on in a nut shell?
48+
49+
The `figures/` directory is a git submodule pointing to a separate repository. When you generate figures with Quarto, they're stored in the external figures repository, keeping this main repository lean and fast to clone.
50+
51+
**Implementation guide**: [Stop Bloating Your Quarto Repository with Figure Files](https://blog.thecoatlessprofessor.com/programming/quarto/stop-bloating-your-main-quarto-website-repository-with-generated-figure-files/)
52+

0 commit comments

Comments
 (0)