Skip to content

Commit 6bd61b3

Browse files
authored
feat: Isomorphic Git, Diff viewer, Cache improvements, UI (#99)
- Replaced Octokit-based implementation with Isomorphic Git-based implementation. - This change resolves a few longstanding issues, as well as address a few frequent requests: - No longer dependent on Octokit, and therefore GitHub as Git host. - Significant performance improvements. - No longer suffers from GitHub API rate limits, mostly due to direct Git calls. - Please let us know if you still run into issue regarding rate limits. - Added support for GitLab, Bitbucket, Gitea, Codeberg, and Self-hosted instances. - Added new diff viewer in the Publication Center. - Split view (side-by-side comparison) and Unified view options. - Configurable default view style in Settings > UI. - Responsive design: defaults to split view on desktop, unified view on mobile. - Synced scrolling between panes in split view. - Improved cache invalidation for dynamic content. - Files containing Dataview or Datacore queries are now automatically detected. - Dynamic files always recompile to ensure query results are up-to-date. - Hash comparison determines if output actually changed, preventing unnecessary updates. - Added UI settings tab for configuring user interface preferences. - Updated documentation.
1 parent 4260b81 commit 6bd61b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+4013
-1429
lines changed

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Quartz Syncer is an [Obsidian](https://obsidian.md/) plugin for managing and publishing notes to [Quartz](https://quartz.jzhao.xyz/), the fast, batteries-included static-site generator that transforms Markdown content into fully functional websites.
44

5+
## Features
6+
7+
- **Multi-provider support**: Works with GitHub, GitLab, Bitbucket, Codeberg, Gitea, and self-hosted Git instances.
8+
- **Plugin integrations**: Compiles [Dataview](https://blacksmithgu.github.io/obsidian-dataview/), [Datacore](https://blacksmithgu.github.io/datacore/), and [Fantasy Statblocks](https://plugins.javalent.com/statblocks) queries into static content.
9+
- **Smart caching**: Caches compiled files for faster subsequent publishes. Dynamic content (Dataview/Datacore queries) is automatically detected and recompiled when needed.
10+
- **Diff viewer**: Preview exact changes before publishing with split (side-by-side) or unified view.
11+
- **Selective publishing**: Choose exactly which notes to publish, update, or remove.
12+
513
## Installation
614

715
Install the plugin by downloading it from the Obsidian Community plugins browser in Obsidian.
@@ -15,7 +23,7 @@ Alternatively, install the plugin by downloading it from the [Release Tab](https
1523
>
1624
> For the most up-to-date information on Quartz Syncer, please refer to the [official documentation](https://saberzero1.github.io/quartz-syncer-docs/).
1725
18-
New to Quartz Syncer? please follow the [setup guide](https://saberzero1.github.io/quartz-syncer-docs/Setup-Guide) to get started.
26+
New to Quartz Syncer? Please follow the [setup guide](https://saberzero1.github.io/quartz-syncer-docs/Setup-Guide) to get started.
1927

2028
## Usage
2129

@@ -30,26 +38,28 @@ For more advanced usages of Quartz Syncer, check the [guides section](https://sa
3038
> [!IMPORTANT]
3139
> **Quartz-related questions**
3240
>
33-
> For issue or questions related to Quartz, not Quartz Syncer, please consult the [Quartz documentation](https://quartz.jzhao.xyz/) or reach out through the communication channels provided there.
41+
> For issues or questions related to Quartz, not Quartz Syncer, please consult the [Quartz documentation](https://quartz.jzhao.xyz/) or reach out through the communication channels provided there.
3442
3543
If you need help with Quartz Syncer, or if you have a question, please first check the [troubleshooting section](https://saberzero1.github.io/quartz-syncer-docs/Troubleshooting/). If your question or issue is not listed, feel free to [reach out for help](https://saberzero1.github.io/quartz-syncer-docs/Troubleshooting/#i-have-a-different-issue-not-listed-here).
3644

3745
## Disclosures
3846

3947
As per the [Obsidian developer policies](https://docs.obsidian.md/Developer+policies#Disclosures):
4048

41-
- **Account requirements**: Quartz Syncer needs to access your Quartz repository on GitHub in order to be able to publish your notes. A GitHub account is therefore required, though also implictly expected, if you're using Quartz.
42-
- **Network use**: Quartz Syncer accesses the network to manage and publish your notes to your Quartz repository on GitHub. Quartz Syncer uses the [GitHub REST API](https://docs.github.com/en/rest) to access your Quartz repository over the network.
43-
- **Accessing files outside of Obsidian vaults**: Quartz Syncer only manages explictly marked *and* user-selected notes in your Quartz repository `content` folder. Quartz Syncer also fetches the current contents of this folder to compare changes against your notes. Quartz Syncer doesn't write any notes to your Obsidian vault, Quartz Syncer only writes to your Quartz repository (one-way only: from Obsidian vault to Quartz repository.) When [authentication is properly set up with a fine-grained access token](https://saberzero1.github.io/quartz-syncer-docs/Guides/Generating-an-access-token#generating-a-fine-grained-access-token), Quartz Syncer is only able to modify file contents on your Quartz repository. Quartz Syncer cannot access other repositories on the same GitHub account or organization, nor modify any other settings in your Quartz Repository.
49+
- **Account requirements**: Quartz Syncer needs to access your Quartz repository on a Git provider in order to publish your notes. An account on your chosen Git provider (GitHub, GitLab, Bitbucket, etc.) is required.
50+
- **Network use**: Quartz Syncer accesses the network to manage and publish your notes to your Quartz repository. Quartz Syncer uses Git over HTTPS to communicate with your repository.
51+
- **Accessing files outside of Obsidian vaults**: Quartz Syncer only manages explicitly marked *and* user-selected notes in your Quartz repository `content` folder. Quartz Syncer also fetches the current contents of this folder to compare changes against your notes. Quartz Syncer doesn't write any notes to your Obsidian vault, Quartz Syncer only writes to your Quartz repository (one-way only: from Obsidian vault to Quartz repository.)
4452

4553
## Acknowledgements
4654

47-
Quartz Syncer would not have been build without the following:
55+
Quartz Syncer would not have been built without the following:
4856

4957
- [Obsidian Digital Garden](https://dg-docs.ole.dev/), on top of which most of this plugin was initially built.
5058
- [Quartz](https://quartz.jzhao.xyz/), for the amazing and welcoming community. Come say hi in the Discord server sometimes.
59+
- [Isomorphic-git](https://isomorphic-git.org/), for enabling Git operations directly in JavaScript.
5160
- [Obsidian Linter](https://github.com/platers/obsidian-linter), for inspiring the tabbed settings UI.
5261
- [Dataview](https://blacksmithgu.github.io/obsidian-dataview/), for their great API integration, allowing me to properly integrate it in Quartz.
5362
- [Datacore](https://blacksmithgu.github.io/datacore/), for their wonderful integration despite its infancy, allowing easy integration into Quartz.
63+
- [Fantasy Statblocks](https://plugins.javalent.com/statblocks), for their extensible functionality and easy-to-integrate API.
5464
- [Obsidian Publish](https://obsidian.md/publish), for inspiring me to create a similar solution for Quartz.
5565
- The entire Obsidian community, for all your weird and amazing creations. Keep it up.

docs/Changelog.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Roadmap and Changelog
33
description: Changelog and feature roadmap for Quartz Syncer.
44
created: 2025-05-16T12:59:31Z+0200
5-
modified: 2025-08-07T09:11:03Z+0200
5+
modified: 2026-01-08T14:46:23Z+0100
66
publish: true
77
---
88

@@ -24,6 +24,27 @@ publish: true
2424

2525
## Released
2626

27+
### Version 1.9.0
28+
29+
- Replaced Octokit-based implementation with Isomorphic Git-based implementation.
30+
- This change resolves a few longstanding issues, as well as address a few frequent requests:
31+
- No longer dependent on Octokit, and therefore GitHub as Git host.
32+
- Significant performance improvements.
33+
- No longer suffers from GitHub API rate limits, mostly due to direct Git calls.
34+
- Please let us know if you still run into issue regarding rate limits.
35+
- Added support for GitLab, Bitbucket, Gitea, Codeberg, and Self-hosted instances.
36+
- Added new diff viewer in the Publication Center.
37+
- Split view (side-by-side comparison) and Unified view options.
38+
- Configurable default view style in Settings > UI.
39+
- Responsive design: defaults to split view on desktop, unified view on mobile.
40+
- Synced scrolling between panes in split view.
41+
- Improved cache invalidation for dynamic content.
42+
- Files containing Dataview or Datacore queries are now automatically detected.
43+
- Dynamic files always recompile to ensure query results are up-to-date.
44+
- Hash comparison determines if output actually changed, preventing unnecessary updates.
45+
- Added UI settings tab for configuring user interface preferences.
46+
- Updated documentation.
47+
2748
### Version 1.8.10
2849

2950
- Fixed publication center showing files outside configured root as publishable.

docs/Guides/Bitbucket Setup.md

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
---
2+
title: Bitbucket Setup
3+
description: Complete guide for setting up Quartz with Bitbucket and Bitbucket Pipelines.
4+
created: 2026-01-08T14:00:00Z+0100
5+
modified: 2026-01-08T18:10:06Z+0100
6+
publish: true
7+
tags: [guides]
8+
---
9+
10+
This guide covers setting up a Quartz repository on Bitbucket, configuring deployment, and connecting Quartz Syncer.
11+
12+
> [!NOTE] Bitbucket Hosting Options
13+
> Bitbucket does not have a built-in static site hosting service like GitHub Pages. This guide covers deploying to external hosting services using Bitbucket Pipelines.
14+
15+
## Create a Quartz Repository
16+
17+
### Option 1: Import from GitHub
18+
19+
1. Log in to Bitbucket and go to your workspace.
20+
2. Click **Create** > **Repository**.
21+
3. Click **Import repository** in the top right.
22+
4. Enter the Quartz URL: `https://github.com/jackyzha0/quartz.git`
23+
5. Set your **Repository name** (e.g., `quartz`).
24+
6. Click **Import repository**.
25+
26+
### Option 2: Create and Push Manually
27+
28+
1. Create a new repository on Bitbucket.
29+
2. Clone Quartz locally:
30+
31+
```bash
32+
git clone https://github.com/jackyzha0/quartz.git
33+
cd quartz
34+
```
35+
36+
3. Change the remote and push:
37+
38+
```bash
39+
git remote set-url origin https://bitbucket.org/<workspace>/<repository>.git
40+
git push -u origin v4
41+
```
42+
43+
## Configure Deployment
44+
45+
Since Bitbucket doesn't have built-in static hosting, you'll need to deploy to an external service. Below are configurations for popular hosting options.
46+
47+
### Option 1: Deploy to Netlify
48+
49+
Create a file `bitbucket-pipelines.yml` in your repository root:
50+
51+
```yaml
52+
image: node:22
53+
54+
pipelines:
55+
branches:
56+
v4:
57+
- step:
58+
name: Build and Deploy to Netlify
59+
caches:
60+
- node
61+
script:
62+
- npm ci
63+
- npx quartz build
64+
- npm install -g netlify-cli
65+
- netlify deploy --prod --dir=public --site=$NETLIFY_SITE_ID --auth=$NETLIFY_AUTH_TOKEN
66+
```
67+
68+
Add these repository variables in **Repository settings** > **Pipelines** > **Repository variables**:
69+
70+
- `NETLIFY_SITE_ID`: Your Netlify site ID
71+
- `NETLIFY_AUTH_TOKEN`: Your Netlify personal access token
72+
73+
### Option 2: Deploy to Cloudflare Pages
74+
75+
```yaml
76+
image: node:22
77+
78+
pipelines:
79+
branches:
80+
v4:
81+
- step:
82+
name: Build and Deploy to Cloudflare
83+
caches:
84+
- node
85+
script:
86+
- npm ci
87+
- npx quartz build
88+
- npm install -g wrangler
89+
- wrangler pages deploy public --project-name=$CF_PROJECT_NAME
90+
```
91+
92+
Add these repository variables:
93+
94+
- `CLOUDFLARE_API_TOKEN`: Your Cloudflare API token
95+
- `CLOUDFLARE_ACCOUNT_ID`: Your Cloudflare account ID
96+
- `CF_PROJECT_NAME`: Your Cloudflare Pages project name
97+
98+
### Option 3: Deploy to Vercel
99+
100+
```yaml
101+
image: node:22
102+
103+
pipelines:
104+
branches:
105+
v4:
106+
- step:
107+
name: Build and Deploy to Vercel
108+
caches:
109+
- node
110+
script:
111+
- npm ci
112+
- npx quartz build
113+
- npm install -g vercel
114+
- vercel deploy --prod --token=$VERCEL_TOKEN public
115+
```
116+
117+
Add this repository variable:
118+
119+
- `VERCEL_TOKEN`: Your Vercel access token
120+
121+
### Enable Bitbucket Pipelines
122+
123+
1. Go to your repository on Bitbucket.
124+
2. Navigate to **Repository settings** > **Pipelines** > **Settings**.
125+
3. Enable Pipelines.
126+
127+
## Generate an App Password
128+
129+
Bitbucket uses App Passwords for API authentication instead of Personal Access Tokens.
130+
131+
1. Click your profile avatar in the bottom left and select **Personal settings**.
132+
2. Under **Access management**, click **App passwords**.
133+
3. Click **Create app password**.
134+
4. Enter a **Label** (e.g., `Quartz Syncer`).
135+
5. Under **Permissions**, select:
136+
- **Repositories**: **Write** (this includes Read)
137+
6. Click **Create**.
138+
7. Copy the generated password immediately.
139+
140+
> [!WARNING] Password Security
141+
> The app password is only shown once. Store it securely.
142+
143+
## Configure Quartz Syncer
144+
145+
1. Open Obsidian and go to **Settings** > **Community Plugins** > **Quartz Syncer**.
146+
2. In the **Git** settings tab:
147+
- **Remote URL**: `https://bitbucket.org/<workspace>/<repository>.git`
148+
- **Branch**: `v4` (or your Quartz branch)
149+
- **Provider**: Bitbucket
150+
- **Authentication Type**: Username & Token/Password
151+
- **Username**: `x-token-auth` (when using an App Password)
152+
- **Access Token**: The app password you generated
153+
154+
A green checkmark indicates a successful connection.
155+
156+
> [!TIP] Username Options
157+
> You can use either `x-token-auth` or your Bitbucket username. Using `x-token-auth` is the standard method for App Passwords.
158+
159+
## Bitbucket Server (Self-Hosted)
160+
161+
If you're using Bitbucket Server (Data Center):
162+
163+
1. Replace `bitbucket.org` with your Bitbucket Server URL.
164+
2. Generate an HTTP Access Token:
165+
- Go to **Profile** > **Manage account** > **HTTP access tokens**
166+
- Create a token with **Repository write** permission
167+
3. Use your Bitbucket Server username in the Username field.
168+
169+
## Alternative: Direct Hosting Service Integration
170+
171+
Instead of using Bitbucket Pipelines, you can connect your hosting service directly to Bitbucket:
172+
173+
### Netlify
174+
175+
1. Log in to Netlify.
176+
2. Click **Add new site** > **Import an existing project**.
177+
3. Select Bitbucket and authorize.
178+
4. Select your Quartz repository.
179+
5. Configure build settings:
180+
- **Build command**: `npx quartz build`
181+
- **Publish directory**: `public`
182+
183+
### Cloudflare Pages
184+
185+
1. Log in to Cloudflare Dashboard.
186+
2. Go to **Workers & Pages** > **Create application** > **Pages**.
187+
3. Connect to Git and select Bitbucket.
188+
4. Select your repository and configure:
189+
- **Build command**: `npx quartz build`
190+
- **Build output directory**: `public`
191+
192+
### Vercel
193+
194+
1. Log in to Vercel.
195+
2. Click **Add New** > **Project**.
196+
3. Import from Bitbucket.
197+
4. Configure:
198+
- **Build Command**: `npx quartz build`
199+
- **Output Directory**: `public`

0 commit comments

Comments
 (0)