Summary
Quartz V5를 생성하고 설정하는 과정을 기록했습니다. Quartz 시스템을 새로 구축하시는 분들에게 도움이 되었으면 좋겠습니다.
References
Tip
처음 Quartz를 구축하시는 분들은 하단부터 올라오면서 따라하시면 갈피를 잡을 수 있습니다!
최하단 : 블로그 제목 수정
플러그인 정리
Excalidraw 그림을 페이지로 보여주는 obsidian-plugin-excalidraw를 추가해 봤지만, 이 플러그인은 publish: true와 상관없이 .excalidraw.md 파일을 모두 공개해서 삭제했습니다. 글에 그림이 필요하면 Excalidraw로 그린 뒤 스크린샷을 넣는 방식으로 대신합니다.
Obsidian 테마를 Quartz에 입혀주는 quartz-themes도 27개 테마를 실제 노트로 비교해 봤는데, 기본 테마가 가장 깔끔해서 사용하지 않고 삭제했습니다.
npx quartz plugin remove obsidian-plugin-excalidraw
npx quartz plugin remove quartz-themesTip
plugin remove는.quartz/plugins의 플러그인 파일,quartz.lock.json,quartz.config.yaml항목을 한 번에 지워줍니다.
코드 폰트 교체
코드 폰트를 JetBrains Mono Nerd Font에서 순정 JetBrains Mono로 바꿨습니다. Nerd Font 파일은 하나에 약 1MB인데 순정 파일은 약 90KB라 페이지가 훨씬 가벼워집니다.
순정 폰트에는 Nerd Font 아이콘이 없어서, 같은 패밀리에 아이콘 영역(PUA)만 unicode-range로 Symbols Nerd Font를 연결했습니다. 아이콘이 없는 페이지에서는 Symbols 파일을 받지 않습니다.
- source: github:quartz-community/fonts
enabled: true
options:
fontOrigin: local
body: '"Pretendard", "SymbolsNerdFontMono", sans-serif'
header: '"Pretendard", "SymbolsNerdFontMono", sans-serif'
- code: '"JetBrainsMonoNerd", "Pretendard", monospace' - source: github:quartz-community/fonts
enabled: true
options:
fontOrigin: local
body: '"Pretendard", "SymbolsNerdFontMono", sans-serif'
header: '"Pretendard", "SymbolsNerdFontMono", sans-serif'
+ code: '"JetBrains Mono", "Pretendard", monospace'$jetbrains-weights: (
100: Thin,
200: ExtraLight,
300: Light,
400: Regular,
500: Medium,
600: SemiBold,
700: Bold,
800: ExtraBold,
);
@each $weight, $name in $jetbrains-weights {
@each $style, $suffix in (normal: "", italic: "Italic") {
$file: "#{$name}#{$suffix}";
// Regular의 이탤릭 파일 이름은 JetBrainsMono-Italic
@if $file == "RegularItalic" {
$file: "Italic";
}
@font-face {
font-family: "JetBrains Mono";
src: url("/static/fonts/JetBrainsMono-#{$file}.woff2") format("woff2");
font-weight: $weight;
font-style: $style;
font-display: swap;
}
@font-face {
font-family: "JetBrains Mono";
src: url("/static/fonts/SymbolsNerdFontMono-Regular.woff2") format("woff2");
font-weight: $weight;
font-style: $style;
font-display: swap;
unicode-range: U+E000-F8FF, U+F0000-FFFFD;
}
}
}Tip
굵기와 이탤릭을 모두 선언해도 브라우저는 페이지에서 실제로 쓰는 폰트 파일만 받습니다.
Footer 수정
Footer를 세 가지 바꿨습니다.
- “Created with Quartz” 문구를 저작권 문구로 교체
- 기술 블로그 링크 추가
- 링크를 이름 대신 아이콘으로 표시하고, 저작권 문구와 같은 줄의 오른쪽 끝에 배치
footer 플러그인은 링크 외에는 옵션이 없어서 custom.scss로 처리했습니다. 아이콘 파일(github.svg, uptime.svg, blog.svg)은 quartz/static/icons에 넣었습니다.
- source: github:quartz-community/footer
enabled: true
options:
links:
GitHub: https://github.com/junbeom-cho/quartz
Uptime-Kuma: https://kuma.techbara.dev/status/quartz
+ Blog: https://blog.techbara.dev// footer 플러그인은 링크 외 문구 옵션이 없어서 "Created with Quartz" 줄을 저작권 문구로 교체
footer > p {
display: none;
}
// 저작권 문구와 링크 아이콘을 한 줄에 두고 아이콘은 오른쪽 끝으로 (좁은 화면에서는 아래 줄로)
footer {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
column-gap: 1rem;
}
// footer 플러그인의 `footer ul { margin-top: -1rem }`(문구 바로 아래에 붙이는 용도) 해제.
// margin-left: auto로 좁은 화면에서 아래 줄로 내려가도 오른쪽 끝 유지
#quartz-body footer ul {
margin: 0 0 0 auto;
}
footer::before {
content: "Copyright \00A9 2026 | All rights reserved.";
display: block;
margin: 1em 0; // 숨긴 <p>와 같은 여백
line-height: 1.6rem;
}
// footer 링크를 아이콘으로 표시. 링크 텍스트는 font-size: 0으로 화면에서만 숨겨 스크린리더는 그대로 읽음
footer ul a[href*="github.com"],
footer ul a[href*="kuma.techbara.dev"],
footer ul a[href*="blog.techbara.dev"] {
font-size: 0;
// 아이콘을 글자 기준선이 아닌 줄 가운데에 맞춤 (숨긴 텍스트도 line-height만큼 높이를 차지함)
display: flex;
align-items: center;
&::before {
content: "";
display: inline-block;
width: 1.25rem;
height: 1.25rem;
background-color: currentColor;
mask: no-repeat center / contain;
}
}
footer ul a[href*="github.com"]::before {
mask-image: url("/static/icons/github.svg");
}
footer ul a[href*="kuma.techbara.dev"]::before {
mask-image: url("/static/icons/uptime.svg");
}
footer ul a[href*="blog.techbara.dev"]::before {
mask-image: url("/static/icons/blog.svg");
}Tip
아이콘은
background-color: currentColor와mask로 그려서 다크/라이트 모드와 마우스 오버 색을 그대로 따라갑니다.
언어 변경 (영어)
날짜, 읽기 시간, 검색창 같은 UI 문구를 영어로 통일했습니다. 일부 플러그인의 한국어 번역이 영어 그대로라(“1 min read” 등) 한국어와 영어가 섞여 보였기 때문입니다.
- locale: ko-KR+ locale: en-USNote
locale은 페이지의<html lang>도 정해서, 이제lang="en"으로 나갑니다.
한글 줄바꿈 수정
기본 설정에서는 한글이 “서비/스”, “네/트워크”처럼 음절 중간에서 줄바꿈됩니다. 본문과 제목만 어절(띄어쓰기) 단위로 줄바꿈되도록 했습니다.
// 본문·제목의 한글을 음절이 아닌 어절(띄어쓰기) 단위로 줄바꿈.
// body 전체에 걸면 띄어쓰기 없는 긴 제목이 모바일에서 가로 스크롤을 만들어 범위를 제한하고,
// 띄어쓰기 없이 긴 단어는 overflow-wrap: anywhere로 강제 줄바꿈
article,
.article-title {
word-break: keep-all;
overflow-wrap: anywhere;
}Obsidian처럼 보이게 수정
한 줄 개행
Obsidian은 기본 설정(Strict line breaks 꺼짐)에서 Enter 한 번이 줄바꿈으로 보이는데, Quartz에서는 한 줄로 합쳐졌습니다. hard-line-breaks 플러그인을 켜서 맞췄습니다.
- source: github:quartz-community/hard-line-breaks
- enabled: false - source: github:quartz-community/hard-line-breaks
+ enabled: trueWarning
블록 ID를 문단 바로 아랫줄에 따로 쓰면(
문단다음 줄에^id) 엉뚱한 문단에 붙습니다. Obsidian의 Copy link to block처럼 문단 끝에 붙여 쓰면 문제없습니다.
없는 노트로 가는 링크 흐리게
아직 만들지 않은 노트로 가는 링크([[없는 노트]])를 Obsidian처럼 흐리게 표시합니다. 이 옵션이 태그 링크에도 broken을 붙여서, 태그 링크는 CSS로 원래대로 돌렸습니다.
- source: github:quartz-community/crawl-links
enabled: true
options:
markdownLinkResolution: shortest
+ disableBrokenWikilinks: true
order: 60// disableBrokenWikilinks가 가상 페이지인 태그 링크에도 broken을 붙이므로 태그 링크는 원래대로
a.internal.tag-link.broken {
opacity: 1;
}Note
publish가 없는 노트로 가는 링크는 흐리게 표시되지 않고, 클릭하면 404가 납니다. Quartz가 공개 여부를 거르기 전에 링크 대상 목록을 만들기 때문입니다.
버그 수정
OG 이미지 한글 깨짐
링크 공유 미리보기(OG 이미지)에서 한글이 전부 네모(□)로 나왔습니다. og-image 플러그인은 theme.typography 폰트를 Google Fonts에서 받아 그리는데, 기본 폰트에 한글이 없기 때문입니다. 한글이 있는 Noto Sans KR로 바꿨습니다.
typography:
- header: Schibsted Grotesk
- body: Source Sans Pro
code: IBM Plex Mono typography:
+ header: Noto Sans KR
+ body: Noto Sans KR
code: IBM Plex MonoTip
사이트 폰트는 fonts 플러그인 설정이 덮어쓰기 때문에 이 값은 OG 이미지에만 쓰입니다. Pretendard는 Google Fonts에 없어서 여기에 쓸 수 없습니다.
백링크가 보이지 않는 문제
has-backlinks 조건이 검사하는 값을 채우는 코드가 없어서 조건이 항상 거짓이었고, 백링크가 어느 페이지에도 나오지 않았습니다. Backlinks 컴포넌트는 백링크가 없으면 알아서 숨기기 때문에 조건을 지웠습니다.
- source: github:quartz-community/backlinks
enabled: true
layout:
position: right
priority: 50
- condition: has-backlinksRSS가 태그 페이지로만 채워지는 문제
날짜가 없는 태그 페이지가 빌드 시각으로 찍혀서 RSS 10개 항목을 전부 차지하고 있었습니다. 본문이 빈 페이지를 RSS·sitemap·검색 인덱스에서 빼서 실제 노트만 남겼습니다.
- source: github:quartz-community/content-index
enabled: true
options:
enableSiteMap: true
enableRSS: true
+ includeEmptyFiles: falseNote
태그 페이지 자체는 그대로 생성되지만 검색 결과와 sitemap에서는 빠집니다.
robots.txt 404
quartz/static/의 파일은 /static/ 아래로 복사돼서 /robots.txt가 404였습니다. quartz.ts에서 사이트 루트로 복사하도록 했고, GitHub Pages 전용인 cname 플러그인은 껐습니다.
const config = await loadQuartzConfig()
// quartz/static/은 /static/ 아래로 복사되므로, robots.txt는 사이트 루트에 따로 복사
config.plugins.emitters.push({
name: "RootRobotsTxt",
async emit({ argv }) {
const dest = joinSegments(argv.output, "robots.txt") as FilePath
await fs.copyFile("quartz/static/robots.txt", dest)
return [dest]
},
}) - source: github:quartz-community/cname
- enabled: true
+ enabled: false폰트 설정 정리
폰트를 custom.scss의 !important 변수로 강제하던 방식에서, Quartz 공식 방식인 fonts 플러그인 설정으로 옮겼습니다. 본문과 제목은 Pretendard로 통일하고, 코드는 JetBrains Mono에 한글만 Pretendard로 나오게 했습니다. 쓰지 않게 된 WantedSans와 D2Coding 폰트 파일은 삭제했습니다.
- source: github:quartz-community/fonts
enabled: true
options:
fontOrigin: local
- body: Pretendard
- header: WantedSans
- code: JetBrains Mono, D2Coding - source: github:quartz-community/fonts
enabled: true
options:
fontOrigin: local
+ body: '"Pretendard", "SymbolsNerdFontMono", sans-serif'
+ header: '"Pretendard", "SymbolsNerdFontMono", sans-serif'
+ code: '"JetBrainsMonoNerd", "Pretendard", monospace'플러그인 설정을 덮어쓰던 custom.scss의 변수는 지웠습니다.
- :root {
- --headerFont: 'WantedSans', 'Pretendard', 'SymbolsNerdFontMono', sans-serif !important;
- --bodyFont: 'Pretendard', 'SymbolsNerdFontMono', sans-serif !important;
- --codeFont: 'JetBrainsMonoNerd', 'D2CodingNerd', 'SymbolsNerdFontMono', monospace !important;
- }Quartz 업그레이드 대비
Quartz는 업스트림(jackyzha0/quartz)을 fork해서 npx quartz upgrade로 계속 따라가는 구조입니다. quartz/ 코어 파일을 직접 고치면 업그레이드할 때마다 merge 충돌이 나서, 직접 고쳤던 부분을 정리했습니다.
수정해도 되는 파일
quartz.config.yaml: 사이트 설정, 플러그인quartz/styles/custom.scss: 스타일quartz/static/: 폰트, 이미지 등 정적 파일quartz.ts: 커스텀 조건 등록 같은 TS 설정이 밖의
quartz/코어 파일은 건드리지 않습니다.
base.scss 원복
Local Font 설정에서 제목 폰트를 강제하려고 base.scss에 넣었던 !important를 지워 업스트림과 같게 되돌렸습니다. 제목 폰트는 이제 fonts 플러그인이 설정합니다.
- font-family: var(--headerFont) !important;
+ font-family: var(--headerFont);package.json의 allowScripts 위치 이동
npm 설치 스크립트 허용 목록(allowScripts)이 package.json 맨 끝에 있어서, 업스트림이 마지막 줄(typescript 버전)을 올릴 때마다 충돌이 났습니다. 업스트림이 거의 건드리지 않는 engines 아래로 옮기고, 더 이상 설치되어 있지 않은 버전은 정리했습니다.
"engines": {
"npm": ">=10.9.2",
"node": ">=22"
},
+ "allowScripts": {
+ "@parcel/watcher": true,
+ "esbuild@0.28.2": true
+ },
"keywords": [Tip
업스트림이 esbuild 버전을 올리면
npm install때 경고가 뜹니다.npm install-scripts approve esbuild로 새 버전을 허용하고,npm install-scripts prune으로 설치되지 않은 버전을 정리합니다.
Node 버전 명시
Quartz v5는 Node.js 22 이상, npm 10.9.2 이상이 필요합니다. mise로 프로젝트 전용 Node 버전을 지정했습니다.
[tools]
node = "24"mise install
node -v최근 게시물 레이아웃 수정
최근 게시물 기능이 기존에는 노트 탐색기 하단에 있어서 노트 탐색기가 모두 보이지 않는 문제가 발생했습니다. 그래서 최근 게시물을 Home의 하단에만 보이도록 레이아웃을 변경하였습니다.
- sourc: github:quartz-community/recent-notes
enabled: true
options:
limit: 3
showTags: true
hideTagPages: true
hideFolderPages: true
layout:
- position: left
- priority: 100
- condition: desktop-only - sourc: github:quartz-community/recent-notes
enabled: true
options:
limit: 3
showTags: true
hideTagPages: true
hideFolderPages: true
layout:
+ position: afterBody
+ priority: 50
+ condition: is-index
BaseURL 수정
sitemap.xml 이 BaseURL 기준으로 생성되기 때문에 SEO를 위해서 BaseURL을 설정해야합니다.
- baseUrl: quartz.jzhao.xyz
+ baseUrl: wiki.techbara.dev최근 게시물 기능
블로그 특성상 최근 추가되거나 수정되는 글이 중요하기 때문에 최근 게시물을 볼 수 있는 플러그인을 사용합니다.
- source: github:quartz-community/recent-notes
enabled: false- source: github:quartz-community/recent-notes
enabled: true
options:
limit: 3
showTage: true
hideTagPages: false
hideFolderPages: false
layout:
position: left
priority: 100Reader 모드 삭제
Quartz에는 사용자가 노트에 집중할 수 있도록 Reader Mode라는 기능이 있는데 굳이 필요 없을 것 같아서 삭제합니다.
- source: github:quartz-community/reader-mode
enabled: true- source: github:quartz-community/reader-mode
enabled: falseLocal Font 설정
Quartz는 기본적으로 Google Fonts를 지원합니다. 하지만 저는 Pretendard와 Paperlogy를 사용하고 싶은데 이게 Google Fonts에 없어서 Local Fonts를 사용할 수 있도록 설정했습니다.
Fonts 설치
/quartz/static/fonts에 원하는 폰트 파일을 설치합니다.
Tip
woff2 버전을 추천합니다.
Config 파일 수정
theme:
- fontOrigin: GoogleFonts
- cdnCaching: true
typography:
header: Schibsted Grotesk
body: Source Sans Pro
code: IBM Plex Monotheme:
+ fontOrigin: local
+ cdnCaching: false
typography:
header: Schibsted Grotesk
body: Source Sans Pro
code: IBM Plex Monoscss 파일 수정
@use "./variables.scss" as *;
@font-face {
font-family: Pretendard;
src: url('/static/fonts/pretendard/Pretendard-Thin.woff2') format('woff2');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: Pretendard;
src: url('/static/fonts/pretendard/Pretendard-ExtraLight.woff2') format('woff2');
font-weight: 200;
font-style: normal;
}
@font-face {
font-family: Pretendard;
src: url('/static/fonts/pretendard/Pretendard-Light.woff2') format('woff2');
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: Pretendard;
src: url('/static/fonts/pretendard/Pretendard-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: Pretendard;
src: url('/static/fonts/pretendard/Pretendard-Medium.woff2') format('woff2');
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: Pretendard;
src: url('/static/fonts/pretendard/Pretendard-SemiBold.woff2') format('woff2');
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: Pretendard;
src: url('/static/fonts/pretendard/Pretendard-Bold.woff2') format('woff2');
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: Pretendard;
src: url('/static/fonts/pretendard/Pretendard-ExtraBold.woff2') format('woff2');
font-weight: 800;
font-style: normal;
}
@font-face {
font-family: Pretendard;
src: url('/static/fonts/pretendard/Pretendard-Black.woff2') format('woff2');
font-weight: 900;
font-style: normal;
}
@font-face {
font-family: Paperlogy;
src: url('/static/fonts/paperlogy/Paperlogy-1Thin.woff2') format('woff2');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: Paperlogy;
src: url('/static/fonts/paperlogy/Paperlogy-2ExtraLight.woff2') format('woff2');
font-weight: 200;
font-style: normal;
}
@font-face {
font-family: Paperlogy;
src: url('/static/fonts/paperlogy/Paperlogy-3Light.woff2') format('woff2');
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: Paperlogy;
src: url('/static/fonts/paperlogy/Paperlogy-4Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: Paperlogy;
src: url('/static/fonts/paperlogy/Paperlogy-5Medium.woff2') format('woff2');
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: Paperlogy;
src: url('/static/fonts/paperlogy/Paperlogy-6SemiBold.woff2') format('woff2');
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: Paperlogy;
src: url('/static/fonts/paperlogy/Paperlogy-7Bold.woff2') format('woff2');
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: Paperlogy;
src: url('/static/fonts/paperlogy/Paperlogy-8ExtraBold.woff2') format('woff2');
font-weight: 800;
font-style: normal;
}
@font-face {
font-family: Paperlogy;
src: url('/static/fonts/paperlogy/Paperlogy-9Black.woff2') format('woff2');
font-weight: 900;
font-style: normal;
}
@font-face {
font-family: JetBrainsMonoNerd;
src: url('/static/fonts/jetbrains/JetBrainsMonoNerdFontMono-Thin.woff2') format('woff2');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: JetBrainsMonoNerd;
src: url('/static/fonts/jetbrains/JetBrainsMonoNerdFontMono-ExtraLight.woff2') format('woff2');
font-weight: 200;
font-style: normal;
}
@font-face {
font-family: JetBrainsMonoNerd;
src: url('/static/fonts/jetbrains/JetBrainsMonoNerdFontMono-Light.woff2') format('woff2');
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: JetBrainsMonoNerd;
src: url('/static/fonts/jetbrains/JetBrainsMonoNerdFontMono-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: JetBrainsMonoNerd;
src: url('/static/fonts/jetbrains/JetBrainsMonoNerdFontMono-Medium.woff2') format('woff2');
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: JetBrainsMonoNerd;
src: url('/static/fonts/jetbrains/JetBrainsMonoNerdFontMono-SemiBold.woff2') format('woff2');
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: JetBrainsMonoNerd;
src: url('/static/fonts/jetbrains/JetBrainsMonoNerdFontMono-Bold.woff2') format('woff2');
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: JetBrainsMonoNerd;
src: url('/static/fonts/jetbrains/JetBrainsMonoNerdFontMono-ExtraBold.woff2') format('woff2');
font-weight: 800;
font-style: normal;
}
@font-face {
font-family: SymbolsNerdFontMono;
src: url('/static/fonts/SymbolsNerdFontMono-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
}
:root {
--headerFont: 'Paperlogy', 'Pretendard', 'SymbolsNerdFontMono', sans-serif !important;
--bodyFont: 'Pretendard', 'SymbolsNerdFontMono', sans-serif !important;
--codeFont: 'JetBrainsMonoNerd', 'Pretendard', 'SymbolsNerdFontMono', monospace !important;
}h1,
h2,
h3,
h4,
h5,
h6,
thead {
- font-family: var(--headerFont);
color: var(--dark);
font-weight: revert;
margin-bottom: 0;
article > & > a[role="anchor"] {
color: var(--dark);
background-color: transparent;
}
}h1,
h2,
h3,
h4,
h5,
h6,
thead {
+ font-family: var(--headerFont) !important;
color: var(--dark);
font-weight: revert;
margin-bottom: 0;
article > & > a[role="anchor"] {
color: var(--dark);
background-color: transparent;
}
}Private 설정 수정
노트가 보이도록 설정 할 수 있는 플러그인이 2 가지 있습니다.
- remove-draft : 노트에
draft: true를 작성하면 노트가 보이지 않음 - explicit-publish : 노트에
publish: true를 작성하면 노트가 보임
remove-draft vs explicit-publish
노트 초본을 작성하고 설정한 것만 보이게 하고 싶으면 explicit-publish가 더 낫다.
- source: github:quartz-community/remove-draft
enabled: true
- source: github:quartz-community/explicit-publish
enabled: false- source: github:quartz-community/remote-draft
enabled: false
- source: github:quartz-community/explicit-publish
enabled: true언어 변경
- locale: en-EN+ locale: ko-KR블로그 제목 수정
configuration:
- pageTitle: Quartz 5configuration:
+ pageTitle: Techbara Wiki