quartz-ready-template

Публикация Vault из Obsidian с использованием Obsidian flavored markdown вместо GitHub flavored markdown

Obsidian & Quartz Template

English | Русский

GitHub Pages Quartz 5 License

Use this 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

  1. Click the green Use this template button at the top of this page and select Create a new repository
  2. In your new repository, go to Settings > Pages and select GitHub Actions as the deployment source
  3. Clone the repository to your computer
  4. Edit content/index.md or add notes, then commit and push your changes to main. Future pushes to main deploy the site automatically
  5. 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 an index.md note. This is the page that opens when visiting https://{user}.github.io/{repo}. Without it, the site will not be published

[!note] When you click on a folder on the site, its index.md opens 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 to quartz.config.yaml and enter your text in this block instead of Quartz 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:

  1. Rename the content/ folder to whatever you prefer. The best option is your repository name
  2. Go to .github/workflows/deploy.yml and 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 notes

Now, after every push to 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 title property 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-created content/index.md file.

[!note] If you want to change the interface language to Russian, go to quartz.config.yaml in the repository root and replace locale: en-US with locale: 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 dependencies
  • public/ -- 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

Related

How to Install

  1. Download the ZIP or clone the repository
  2. Open the folder as a vault in Obsidian (File → Open Vault)
  3. Obsidian will prompt you to install required plugins

Stats

Stars

0

Forks

0

License

MIT

Last updated 7d ago

Categories

Tags

github-actiongithub-pagesmarkdownobsidianobsidian-mdobsidian-notesobsidian-vaultquartztemplatetemplate-projecttemplate-repositorytemplates