Fix Quartz build to preserve git history for accurate file dates #106

Merged
eblume merged 1 commit from fix/quartz-content-directory into main 2026-02-04 08:46:47 -08:00
2 changed files with 7 additions and 9 deletions
Showing only changes of commit 5eab39b68b - Show all commits

Fix Quartz build to preserve git history for accurate file dates

Use -d docs flag instead of symlinking content directory. This allows
git to find file history at the correct paths (docs/...) instead of
the symlinked paths (content/...) which have no history.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Erich Blume 2026-02-04 08:40:43 -08:00

View file

@ -166,15 +166,12 @@ jobs:
cp docs/quartz.config.ts .
cp docs/quartz.layout.ts .
# Symlink docs as content (preserves git history for accurate dates)
ln -s docs content
# Copy CHANGELOG.md into docs so it's part of the content
cp CHANGELOG.md docs/
# Symlink CHANGELOG.md into docs so it's part of the content
ln -s ../CHANGELOG.md docs/CHANGELOG.md
# Build (from within repo so git commands work)
# Build using -d docs so git can find file history at correct paths
echo "Building static site..."
npx quartz build
npx quartz build -d docs
# Create tarball
TARBALL="docs-${VERSION}.tar.gz"
@ -185,9 +182,9 @@ jobs:
ls -lh "$TARBALL"
# Clean up Quartz build artifacts (keep tarball)
rm -rf quartz content public node_modules
rm -rf quartz public node_modules
rm -f package.json package-lock.json tsconfig.json quartz.config.ts quartz.layout.ts
rm -f docs/CHANGELOG.md # Remove symlink
rm -f docs/CHANGELOG.md # Remove copied file
- name: Create release
env:

View file

@ -0,0 +1 @@
Fix Quartz build to use -d docs flag for accurate git-based file dates