sync_quartz_configs.py

source scripts maintenance quartz

File Path: scripts/sync_quartz_configs.py

Purpose: Synchronizes Quartz configuration files from a separate fork repository (quartz-fork) into the local quartz-config directory.

Overview

This utility ensures that the documentation site’s layout and configuration remain in sync with any upstream changes or customizations made in the dedicated Quartz fork. It is typically run as part of a pre-commit or maintenance routine.

Execution Logic

  1. Source Discovery: Locates the quartz-fork directory (assumed to be a sibling of the project root).
  2. File Copying: Copies quartz.config.ts and quartz.layout.ts.
  3. Git Integration: Automatically runs git add on the copied files to ensure they are staged for the next commit.

Configuration

  • SYNC_FILES: List of files to track.
  • SOURCE_DIR: Path to the external fork.
  • DEST_DIR: Path to the local configuration storage (quartz-config/).

Usage

uv run scripts/sync_quartz_configs.py