mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-22 14:05:43 -05:00
1.9 KiB
1.9 KiB
| title |
|---|
| quartz upgrade |
The upgrade command upgrades the Quartz framework itself to the latest version by pulling changes from the official Quartz repository.
Usage
npx quartz upgrade
How it Works
When you run npx quartz upgrade, Quartz performs the following steps:
- Backs up your content — your content folder is cached locally to prevent data loss.
- Pulls the latest Quartz code — fetches and merges from the official upstream repository (
upstream/v5) using Git. - Shows version changes — displays the version transition (e.g.,
v5.0.0 → v5.1.0) or confirms you're already up to date. - Updates dependencies — runs
npm installto ensure all packages match the new version. - Restores plugins — reinstalls plugins from
quartz.lock.jsonto ensure compatibility. - Checks plugin compatibility — verifies that installed plugins are compatible with the new Quartz version.
Handling Conflicts
Because Quartz allows you to customize almost every part of the code, upgrades can sometimes result in merge conflicts. This happens if you have modified a file that the Quartz team has also updated.
If a conflict occurs:
- Git will mark the conflicting sections in the affected files.
- You will need to open these files and manually choose which changes to keep.
- After resolving the conflicts, you can commit the changes.
Recovery
If an upgrade goes wrong or leaves your project in an unusable state, you can use the cli/restore command to recover your content from the local cache.
Flags
The upgrade command supports the standard cli/index (--directory, --verbose).
See Also
- cli/update — update installed plugins
- getting-started/upgrading — detailed upgrading guide
- cli/restore — recover content from cache