Decluttering quarto artifacts (e.g., sitemap, *.html) in git, seeking workflow advice #14024
Unanswered
dikiprawisuda
asked this question in
Q&A
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi everyone, I hope this post finds you all well.
I'm relatively new to web development with Quarto (or at all), and I'm trying to refine my Git workflow. Here's a little background, along with some lessons that might be useful for others.
Lesson 1: Organize articles in date-based folders
My website is a basic blog featuring work in R and/or Python with a reproducible workflow. I organize all my content into
./articles/<date>/folders, which keeps assets like images neatly contained. I learned that you can do wonders with anindex.qmdinside a directory — this way, article URIs end with*/<date>/instead of*/<date>.html, which is much cleaner and less limiting.Lesson 2: Render locally to preserve
date-modifiedI use GitLab Pages to host my website. Previously, I used GitLab's CI/CD to render remotely after every push. Not only did deployment take a while, but it also scrambled all the
date-modifiedinformation — untouched articles would get an updateddate-modified, which is undesirable. I switched to rendering locally and configured Quarto to output to/public/:The problem: Git noise from rendered output
When working on blog subfolders and running quarto preview, I notice a lot of noise in my Git status — folders like public/ and _freeze/. I fully recognize that these artifacts are essential for the browser to render the site and for GitLab Pages to serve it; however, they are rendered artifacts, not the source files (.qmd) I actually care about tracking.
I've been working this way for a while, so the noise is likely already baked into my Git history. I'm worried it's cluttering things and making past changes hard to review.
Ideally, whenever I change a
.qmdand peek at the results withquarto preview, I'd like to commit only the changed.qmdwith a meaningful commit message — almost like the "version history" feature in Google Docs so that I can focus on the writing part. I'd also like to minimize re-rendering by only rebuilding what has actually changed.Questions
For those of you managing Quarto sites, especially if you've been at it for a while:
.qmdfiles and using hooks to render before pushing._freezeand caching? Any tips for minimizing unnecessary re-renders?I'm looking for a sustainable best practice that keeps things tidy without too much overhead.
Thanks for any insights!
Beta Was this translation helpful? Give feedback.
All reactions