Create Your First Quartz Site
Once you have Quartz installed, you can create and build your first site in just a few commands.Initialize Your Content
Run the This interactive command will guide you through the setup process.
create command to set up your content folder:Setup Options
You’ll be prompted to choose how to initialize your content:- Empty Quartz
- Copy Existing Folder
- Symlink Existing Folder
Start with a blank slate:
- Creates a new
contentfolder - Adds a default
index.mdwelcome page - Perfect for starting fresh
Link Resolution Strategy
Next, choose how Quartz should resolve links (this should match your Obsidian settings):| Strategy | Description | Example |
|---|---|---|
| Shortest Path | Links use the shortest unique path (default) | [[note]] |
| Absolute Path | Links use full path from root | [[folder/subfolder/note]] |
| Relative Path | Links are relative to current file | [[../other/note]] |
You can change this later in
quartz.config.ts by modifying the markdownLinkResolution option.Build Your Site
Build your Quartz site into static HTML files:This command:
- Processes all Markdown files in your
contentfolder - Generates static HTML, CSS, and JavaScript
- Outputs to the
publicfolder (by default)
Build Options
Preview Locally
Start a local development server to preview your site:This will:
- Build your site
- Start a local server at
http://localhost:8080 - Watch for changes and rebuild automatically
- Enable hot-reload for instant updates
Local Preview
Open http://localhost:8080 in your browser to see your site.
Server Options
Add Your Content
Add Markdown files to your Your site will automatically rebuild and refresh if the server is running.
content folder:Frontmatter
Add YAML frontmatter to customize each page:All CLI Commands
Quartz provides several commands to manage your site:create
Initialize Quartz and set up your content folder
build
Build Quartz into static HTML files
update
Get the latest Quartz updates from upstream
sync
Sync your Quartz to and from GitHub
restore
Restore your content folder from cache
Common Command Options
Build Command Flags
| Flag | Alias | Default | Description |
|---|---|---|---|
--serve | - | false | Run a local server for live preview |
--watch | - | false | Watch for changes and rebuild automatically |
--output | -o | public | Output folder for built files |
--directory | -d | content | Directory to look for content files |
--port | - | 8080 | Port to serve Quartz on |
--wsPort | - | 3001 | Port for WebSocket hot-reload |
--verbose | -v | false | Print extra logging information |
--bundleInfo | - | false | Show detailed bundle information |
--concurrency | - | auto | Number of threads for parsing notes |
Create Command Flags
| Flag | Alias | Description |
|---|---|---|
--strategy | -X | Content folder setup strategy: new, copy, or symlink |
--source | -s | Source directory to copy/symlink from |
--links | -l | Link resolution strategy: absolute, shortest, or relative |
--directory | -d | Directory to create/modify (default: content) |
Sync Command Flags
| Flag | Alias | Default | Description |
|---|---|---|---|
--commit | - | true | Create a git commit for unsaved changes |
--message | -m | auto | Override the default commit message |
--push | - | true | Push updates to your fork |
--pull | - | true | Pull updates from your fork |
Example Workflows
Development Workflow
Development Workflow
Import Obsidian Vault
Import Obsidian Vault
Deploy Workflow
Deploy Workflow
Update Quartz
Update Quartz
Next Steps
Configuration
Customize your Quartz site by editing
quartz.config.tsHosting
Deploy your site to the web using platforms like GitHub Pages, Netlify, or Vercel
Plugins
Extend Quartz functionality with plugins and transformers
Themes
Customize the look and feel of your site with themes and styling
For more advanced configuration and customization options, visit the official Quartz documentation.