Standalone Binary
Is your feature request related to a problem? Please describe. I don't like that to use Quartz, I have to write my content inside the repository that hosts the Quartz source code. This feels very brittle and is not clean. I don't want to have the dependency on Node on the machine where I write the content.
Describe the solution you'd like I'd prefer to simply have an Obsidian vault repository and be able to use Quartz in a workflow.
Describe alternatives you've considered I've tried to make it work with submodules but it's to cumbersome. Another repository that gets pushed to on updates of the vault repository could work but that's not elegant either. Pulling in the Quartz repository and install it in a workflow doesn't seem like an easy solution, although it sounds promising.
+1
Making the content folder configurable - i.e. letting it point to a place outside of the quartz repo/folder would already help. (using symlinks does not work in all cases)
Hey,
As you mentioned using Obsidian, perhaps the Quartz Syncer plugin is appropriate for your use case. It allows you to manage your Quartz content from inside Obsidian.
https://saberzero1.github.io/quartz-syncer-docs/
https://saberzero1.github.io/quartz-syncer-docs/
This is a welcome tip but misses some of my point. I do not want to have a Quartz repository. The repo should be purely my Markdown files (the content of the website to be), without the static HTML files, Quartz JS source code and configuration.
https://saberzero1.github.io/quartz-syncer-docs/
This is a welcome tip but misses some of my point. I do not want to have a Quartz repository. The repo should be purely my Markdown files (the content of the website to be), without the static HTML files, Quartz JS source code and configuration.
Your question was twofold:
- You don't want to write your notes inside the Quartz repository.
- You don't want to depend on Node on the machine you write content on.
Quartz Syncer addresses both of these concerns. You can keep using your current vault structure, and you don't have to keep Quartz on your local machine. The only requirement is installing the plugin in Obsidian and configuring your fork of Quartz for Quartz Syncer. This can be done fully from the browser if so desired.
If you completely want to keep Quartz out any repository on your account, you'd have to implement your suggestion solution; create a GitHub Action that pulls Quartz, applies the bare minimally needed configuration changes (baseUrl, link resolution setting if not set to shortest in Obsidian), and deploys the site as normal.
I looked for discussions why - although quartz is generally highly configurable - particularly the content folder is hardcoded, but couldn’t find any. Can someone share what the reasons are/were to not offer a config option for this? Would a PR introducing such an option have a chance of getting accepted?
I looked for discussions why - although quartz is generally highly configurable - particularly the content folder is hardcoded, but couldn’t find any. Can someone share what the reasons are/were to not offer a config option for this? Would a PR introducing such an option have a chance of getting accepted?
Both the input and output folders are configurable and can be passed as flags to the build command.
https://quartz.jzhao.xyz/build
My current setup is:
- Create an orphan branch without any of the quartz stuff
- But my obsidian notes in that branch
- Trigger a CI pipeline every time I push to that orphan branch so it builds and uploads to quartz.
This way, devices I take notes in don't have to know about quartz at all. My notes also stay independent of any publisher, in case I want to change from quartz or someting.
The CI pipeline in my orphan branch (can't make the repo public since it has some private stuff)
name: Deploy Quartz site to GitHub Pages
on:
push:
branches:
- v4
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for cross-branch operations
- name: Fetch notes folder from orphan main branch
run: |
git fetch origin main
git checkout v4
git worktree add ../main-branch main
rm -rf content
cp -r ../main-branch/notes/ content/
find content/ -type f -name "*.md" -exec sed -i 's|\[\[notes/|\[\[|g' {} +
git worktree remove ../main-branch --force
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install Dependencies
run: npm ci
- name: Build Quartz
run: npx quartz build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: public
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Maybe publishing quartz as a npm package is better, so that is can be used like vitepress
Actually, Docker Support is already available officially. You can simply mount the content directory and configuration files, and treat it essentially as an executable.