p:: PKM
f:: Obsidian
Welcome to Quartz 4
Quartz is a fast, batteries-included static-site generator that transforms Markdown content into fully functional websites.
🪴 Get Started
git clone https://github.com/jackyzha0/quartz.git
cd quartz
npm i
npx quartz create
┌ Quartz v4.2.3
│
â—‡ Choose how to initialize the content in `/Users/adithya321/Downloads/quartz/content`
│ Copy an existing folder
│
â—‡ Enter the full path to existing content folder
│ /Users/adithya321/Documents
│
â—‡ Choose how Quartz should resolve links in your content. This should match Obsidian's link format. You can change this later in `quartz.config.ts`.
│ Treat links as shortest path
│
â”” You're all set! Not sure what to do next? Try:
• Customizing Quartz a bit more by editing `quartz.config.ts`
• Running `npx quartz build --serve` to preview your Quartz locally
• Hosting your Quartz online (see: https://quartz.jzhao.xyz/hosting)
npx quartz build --serve --port 8081
Quartz v4.2.3
Cleaned output directory `public` in 19ms
Found 113 input files from `content` in 14ms
Parsed 113 Markdown files in 1s
Filtered out 0 files in 93ÎĽs
Emitted 127 files to `public` in 438ms
Done processing 113 files in 2s
Started a Quartz server listening at http://localhost:8081
hint: exit with ctrl+c
Create a new repository on GitHub.com. Do not  initialize the new repository with README
, license, or gitignore
 files.
copy the remote repository URL
git remote set-url origin REMOTE-URL
Then, you can sync the content to upload it to your repository. This is a helper command that will do the initial push of your content to your repository.
npx quartz sync --no-pull
Quartz v4.2.3
Backing up your content
Detected symlink, trying to dereference before committing
[v4 234e5dd] Quartz sync: Mar 25, 2024, 8:43 AM
2 files changed, 2 insertions(+)
delete mode 100644 content/.gitkeep
Pushing your changes
Enumerating objects: 8657, done.
Counting objects: 100% (8657/8657), done.
Delta compression using up to 10 threads
Compressing objects: 100% (3126/3126), done.
Writing objects: 100% (8657/8657), 6.52 MiB | 1.26 MiB/s, done.
Total 8657 (delta 5426), reused 8652 (delta 5424), pack-reused 0
remote: Resolving deltas: 100% (5426/5426), done.
To github.com:adithya321/quartz.git
* [new branch] v4 -> v4
branch 'v4' set up to track 'origin/v4'.
Done!
In future updates, you can simply run npx quartz sync
 every time you want to push updates to your repository.
Vercel
Before deploying to Vercel, a vercel.json
 file is required at the root of the project directory. It needs to contain the following configuration so that URLs don’t require the .html
 extension:
vim vercel.json
{
"cleanUrls" : true
}
npx quartz sync
Quartz v4.2.3
Backing up your content
[v4 d5e5410] Quartz sync: Mar 25, 2024, 11:15 AM
1 file changed, 3 insertions(+)
create mode 100644 vercel.json
Pulling updates from your repository. You may need to resolve some `git` conflicts if you've made changes to components or plugins.
From github.com:adithya321/quartz
* branch v4 -> FETCH_HEAD
Already up to date.
Pushing your changes
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 10 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 321 bytes | 321.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:adithya321/quartz.git
cc77a05..d5e5410 v4 -> v4
branch 'v4' set up to track 'origin/v4'.
Done!