Skip to content

Repository housing a Quarto website/blog project that uses a git submodule to retrieve generated figures stored in a separate repository

Notifications You must be signed in to change notification settings

coatless-tutorials/demo-figure-quarto-website

Repository files navigation

Demo Quarto Website with Figure Submodule

This repository demonstrates how to keep your main Quarto website repository lightweight by storing generated figures in a separate git submodule.

Repository Structure

├── _quarto.yml          # Site configuration
├── index.qmd            # Homepage
├── posts/               # Blog posts
│   └── welcome/
│       └── index.qmd
└── figures/             # Git submodule (external repository)
    └── post-figures/
        ├── plot1.png
        └── plot2.png

Usage

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.

Clone with Submodules

You need to clone the repository with its submodule to ensure the figures/ directory is included.

# Clone including the figures submodule
git clone --recursive https://github.com/coatless-tutorials/demo-figure-quarto-website.git

# Or if already cloned
git submodule update --init --recursive

Local Development

You can view the Quarto website locally using the following commands:

# Preview the website
quarto preview

# Render the site
quarto render

What's going on in a nut shell?

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.

Implementation guide: Stop Bloating Your Quarto Repository with Figure Files

About

Repository housing a Quarto website/blog project that uses a git submodule to retrieve generated figures stored in a separate repository

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages