quartz-ready-template
Публикация Vault из Obsidian с использованием Obsidian flavored markdown вместо GitHub flavored markdown
Obsidian & Quartz Template
A ready-to-use, configured, and optimized template for instantly publishing notes and knowledge bases from Obsidian as a static website powered by Quartz 5.
GitHub vs Quartz | Quick start | Local setup and testing | Documentation
Example site built with this template | Example site from the Quartz 5 documentation
GitHub vs Quartz
GitHub Markdown does not support most of Obsidian's convenient Markdown features. This template renders the following correctly on the site:
- Wiki-links:
[[Note name]]and[[Note name|Custom text]]with automatic path resolution. - Callouts:
> [!quote],> [!success],> [!bug], and more. Folding and custom titles are supported (> [!note]- Clarification,> [!important]+ Important!). - Support for Obsidian Bases (
.base) and Canvas (.canvas) files, and much more
Quick start: create your website in 1 minute
- Click the green Use this template button at the top of this page and select Create a new repository
- In your new repository, go to Settings > Pages and select GitHub Actions as the deployment source
- Clone the repository to your computer
- Edit
content/index.mdor add notes, then commit and push your changes tomain. Future pushes tomaindeploy the site automatically - Find the site URL in Settings > Pages. Project sites usually use
https://{user}.github.io/{repo}
For custom-domain setup, see the Quick Start guide.
[!important] Make sure that the
content/folder always contains anindex.mdnote. This is the page that opens when visitinghttps://{user}.github.io/{repo}. Without it, the site will not be published
[!note] When you click on a folder on the site, its
index.mdopens if it exists; otherwise, a simple list of all files in the folder is shown
[!tip] To set your own text in the top-left corner instead of
Quartz 5, go toquartz.config.yamland enter your text in this block instead ofQuartz 5:configuration: pageTitle: Quartz 5
Tips for use
[!important] For convenience when working with notes, it is recommended to open the
content/folder as your Vault rather than opening the repository itself. The folder name may be inconvenient if you have multiple Vaults. To change the name of the notes folder:
- Rename the
content/folder to whatever you prefer. The best option is your repository name- Go to
.github/workflows/deploy.ymland make the following change:# Before: - name: Build Quartz run: npx quartz build # After (for example, if the folder is named notes): - name: Build Quartz run: npx quartz build -d notesNow, after every
pushto the repository, the notes folder used for the site will change to the one you specified.
[!tip] You can name notes not in English, but when copying a site link it often turns into something like this:
https://{user}.github.io/{repo}/path/to/note/#%D0%B4%D0%BE%D0%B1%D1%80%D0%BE-%D0%BF....To avoid this, it is recommended to name notes in English without spaces and use the
titleproperty for their display names, which is automatically extracted from the note on the site. You can see an example of this approach in the pre-createdcontent/index.mdfile.
[!note] If you want to change the interface language to Russian, go to
quartz.config.yamlin the repository root and replacelocale: en-USwithlocale: ru-RU. I personally prefer not to do this because the site's font is not designed for Russian, so the text may appear smaller.
Local setup and testing
To preview the site locally, you need Node.js (version 22.22 or newer). Go to the root of the cloned repository and run:
# 1. Install dependencies
npm ci
# 2. Install Quartz plugins
npx quartz plugin install --from-config
# 3. Start the local server (if the folder is the default 'content')
npx quartz build --serve
# If you renamed the folder (for example, to notes):
npx quartz build --serve -d notes
After running these commands, the terminal will print the address where the site is available. It is usually http://localhost:8080. Changes to files in the content/ folder automatically refresh the page.
Service files and Git
The following directories are created while installing dependencies and building locally:
node_modules/-- project libraries and dependenciespublic/-- the compiled static site (HTML, JS, CSS, generated graphs).quartz-cache/-- the Markdown parser cache for faster subsequent builds
All these folders are listed in .gitignore, so they will not be added to your GitHub repository.
Documentation
How to Install
- Download the ZIP or clone the repository
- Open the folder as a vault in Obsidian (File → Open Vault)
- Obsidian will prompt you to install required plugins
Stats
Stars
0
Forks
0
License
MIT
Last updated 7d ago
Categories
Tags