๋™๊ธฐ

  • ๋‹ค๋ฅธ ๋ธ”๋กœ๊ทธ ํ˜ธ์ŠคํŒ… ์„œ๋น„์Šค(Tistory, Velog)๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด, ๋‚ด๊ฐ€ ์˜จ์ „ํžˆ ๊ด€๋ฆฌํ•˜์ง€ ๋ชปํ•œ๋‹ค๋Š” ์ธก๋ฉด์—์„œ ์•„์‰ฌ์›€์ด ์žˆ์—ˆ๋‹ค.
  • Github Page๋ฅผ Jekyll์„ ์‚ฌ์šฉํ•ด ํฌ์ŠคํŒ…ํ•ด๋ณด์•˜์ง€๋งŒ, 1000๊ฐœ๊ฐ€ ๋„˜์–ด๊ฐ€๋Š” ์‹œ์ ๋ถ€ํ„ฐ ๋„ˆ๋ฌด ๋Š๋ ค ์‚ฌ์šฉํ•˜๊ธฐ๊ฐ€ ๊บผ๋ ค์กŒ๋‹ค.
  • ๊ทธ ์™€์ค‘์— Obsidian์„ ์•Œ๊ฒŒ ๋˜์—ˆ๋‹ค.
  • Obsidian์€ ๋‚ด ๋กœ์ปฌ์— Markdown ํ˜•์‹์œผ๋กœ ์ €์žฅ๋˜๋ฉด์„œ ํ™•์žฅ์„ฑ์ด ๋†’์€ ๋ฌธ์„œ ๊ด€๋ฆฌ ๋„๊ตฌ์ด๋‹ค.
  • ์ด์— ๋ธ”๋กœ๊ทธ ์ „์ฒด๋ฅผ Obsidian์œผ๋กœ ์˜ฎ๊ธฐ๋ฉด์„œ ๋‚˜์˜ ๋ชจ๋“  ๊ฒƒ์„ ๊ด€๋ฆฌํ•ด๋ณด์ž๋Š” ๋ชฉํ‘œ๋ฅผ ์„ธ์› ๋‹ค.

ํ•„์š” ๊ธฐ๋Šฅ

  • ๋ฌธ์„œ์˜ Export ์—ฌ๋ถ€์— ๋”ฐ๋ผ ์˜ฌ๋ฆฌ๊ฑฐ๋‚˜, ๊ทธ๋ ‡์ง€ ์•Š๊ฑฐ๋‚˜ ํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค.
  • UI๊ฐ€ ๊น”๋”ํ•ด์•ผ ํ•œ๋‹ค.
  • Obsidian์˜ ๊ธฐ๋Šฅ ์ž์ฒด๋ฅผ ์–ด๋Š์ •๋„ ๋ฐ˜์˜ํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค.
  • ์›นํŽ˜์ด์ง€์— ์˜ฌ๋ผ๊ฐ„ ์ดํ›„ ์†๋„๊ฐ€ ๋นจ๋ผ์•ผ ํ•œ๋‹ค.
  • ๋ชจ๋ฐ”์ผ ๋Œ€์‘์ด ๋˜์–ด์•ผ ํ•œ๋‹ค.

๋„๊ตฌ

  • Quartz
  • obsidian-export
    • Obsidian์•ˆ์— ํด๋” ๊ณต๊ฐœ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ด๋‘๊ณ , ์ด๋ฅผ ๋ฐ”๊นฅ์œผ๋กœ ๋‚ด๋ณด๋‚ผ ์ˆ˜ ์žˆ๋Š” ๋„๊ตฌ์ด๋‹ค.

๊ฐœ์š”

flowchart LR
A[Obsidian] --> B;
B{obsidien-export \n Publishingํ•  ๋‚ด์šฉ์ธ๊ฐ€?} --> |Yes ๋ณต์‚ฌ O| C;
B --> |No ๋ณต์‚ฌ X| D;
C[Quartz] --> |push| E;
D[ํ˜„์ƒ ์œ ์ง€];
E[Github repo \n forked Quartz] --> |Github Action| F;
F[HTML \n using Hugo] --> G;
G[Github Pages];

  • iCloud์— Obsidian Vault๋ฅผ ๋งŒ๋“ ๋‹ค.
  • Vault๊ฐ€ ์ƒ์„ฑ๋œ ๊ฐ™์€ ํด๋”์— forkํ•œ Quartz๋ฅผ cloneํ•œ๋‹ค.
  • Obsidian์œผ๋กœ ๊ธ€์„ ์ž‘์„ฑํ•œ๋‹ค.
  • ํŠน์ • ์‹œ์ ์— Quartz์—์„œ sync ๋ฉ”์„œ๋“œ๋ฅผ ํ†ตํ•ด Publish ์ €์žฅ์†Œ์™€ ๋™๊ธฐํ™”ํ•˜์—ฌ ๊ธ€์„ ์ถœ๊ฐ„ํ•œ๋‹ค.
    • ์ด ๋•Œ, ์›ํ•˜๋Š” ๊ธ€๋งŒ ์ถ”์ถœํ•œ๋‹ค. (obsidian-export)

๋ฐฉ๋ฒ•

Domain

๊ตฌ๋งค

  • ๋‚˜๊ฐ™์€ ๊ฒฝ์šฐ, ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” github.io๋Š” ๊ฑด๋“ค๊ณ  ์‹ถ์ง€ ์•Š์•˜๋‹ค.
  • ์ƒˆ๋กœ ๋„๋ฉ”์ธ์„ ํŒŒ๋ณด๊ณ  ์‹ถ๊ธฐ๋„ ํ•ด์„œ, ๊ตฌ๋งค๋ฅผ ์ง„ํ–‰ํ–ˆ๋‹ค.
  • ๊ตฌ๋งค๋Š” ์‰ฝ๋‹ค. ๋‹ค์–‘ํ•œ ๋„๋ฉ”์ธ ์‚ฌ์ดํŠธ์— ๊ฐ€์„œ ์‚ฌ๊ณ ์‹ถ์€๊ฑธ ์ผ๋‹จ ๊ตฌ๋งคํ•˜์ž.
  • 1๋…„ ๋‹จ์œ„๋กœ ์ด๋ฒคํŠธ๋ฅผ ํ•˜์—ฌ ๋‹น์žฅ์€ 1๋…„์งœ๋ฆฌ๋ฅผ ๊ตฌ๋งคํ–ˆ๋‹ค.
  • ๊ฐ€๋น„์•„์—์„œ ์ง„ํ–‰ํ–ˆ๋‹ค.

์„ค์ •

  • Managing a custom domain for your GitHub Pages site

  • ์œ„๋ฅผ ๋ณด๋ฉด, Domain์˜ ๊ถŒ์žฅํ•˜๋Š” DNS์„ธํŒ…์ด ์žˆ๋‹ค.

  • ์ด๋ ‡๊ฒŒ ์„ธํŒ…ํ•ด์ฃผ๊ณ , Page Repo์˜ ์„ค์ • > Pages์— ๊ฐ€์„œ ๋“ฑ๋ก๋œ ๋„๋ฉ”์ธ์„ ์ง€์šฐ๊ณ  ๋‹ค์‹œ ์„ค์ •ํ•ด์ฃผ์ž.

HTTPS ์ ์šฉ

Quarts ์„ค์ •

  • Quarts๋Š” Markdown์„ ๊ฐ€์ง€๊ณ  HTML ํ˜•์‹์œผ๋กœ ๋ณ€ํ™˜ํ•ด์ฃผ๋Š” ๋…€์„์ด๋‹ค.
  • Quarts๋ฅผ ํ†ต๊ณผํ•œ ๊ฒฐ๊ณผ๋ฌผ์„ github pages๋กœ ๋„˜๊ฒจ์ค„ ๊ฒƒ์ด๋‹ค.
  • ์ด๋ฅผ ๋‹ด์„ ํด๋”๋ฅผ ๋งŒ๋“ค๊ณ , github repo๋ฅผ remote๋กœ ์„ค์ •ํ•ด์ฃผ์ž. ํด๋” ์ด๋ฆ„์€ Publish๋กœ ํ•œ๋‹ค.
git init
git remote add origin "https://github.com/wansook0316/Wansook.World" 

obsidian-export

  • rust ์„ค์น˜
  • cargo install obsidian-export
  • ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ๋“ฑ๋ก
  • .zshrc > export PATH:$PATH:$HOME/.cargo/bin ์ถ”๊ฐ€.
  • rust ๊ด€๋ จ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์„ค์น˜๋˜๋Š” ๊ฒฝ๋กœ๋ฅผ ํ™˜๊ฒฝ๋ณ€์ˆ˜์— ์ถ”๊ฐ€ํ•˜์—ฌ CLI๋กœ ๋ฐ”๋กœ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•œ ๊ฒƒ.
  • source ~/.zshrc๋ฅผ ํ†ตํ•ด ์˜๊ตฌ์ ์šฉํ•˜์ž.

Sugar script

  • obsidian์„ iCloud์— ๋†“๊ณ  ์“ฐ๋‹ค๋ณด๋‹ˆ, Cloud/.obsidian์— ์œ„์น˜ ์‹œ์ผœ๋†“์•„์•ผ ์—ฌ๋Ÿฌ๊ฐœ์˜ ์• ํ”Œ ๋””๋ฐ”์ด์Šค์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.
  • ๊ทธ๋ ‡๊ธฐ์— Quartz ์—์„œ ์š”๊ตฌํ•˜๋Š”๋Œ€๋กœ contentํด๋”์— Obsidian์„ ๋†“๊ณ  ์ž‘์—…ํ•  ์ˆ˜๊ฐ€ ์—†๋‹ค.
    • ๊ทธ๋Ÿฌ๋ฉด Obsidian iOS ์•ฑ์—์„œ ์ ‘๊ทผ์„ ๋ชปํ•œ๋‹ค.
  • ๊ทธ๋ž˜์„œ ์œ„์—์„œ ์„ค์น˜ํ•œ obsidian-export์„ ํ†ตํ•ด, obsidian์—์„œ ๋‚ด๊ฐ€ ์›ํ•˜๋Š” ํ•ญ๋ชฉ๋งŒ ์ถ”์ถœํ•˜์—ฌ content๋กœ ๋ณต์‚ฌํ•˜๋ ค๋Š” ๊ฒƒ์ด๋‹ค.
  • ์ด์— local server๋ฅผ ๋„์šฐ๊ณ , sync ๋™์ž‘ํ•˜๋Š” ์Šคํฌ๋ฆฝํŠธ ๋‘๊ฐœ๋ฅผ ์ž‘์„ฑํ–ˆ๋‹ค.

serve.sh

#!/bin/bash
 
content_name="content"
 
vault_name="World"
 
echo "==== ๋ชจ๋“  $content_name folder์˜ ๋‚ด์šฉ์„ ์ง€์›๋‹ˆ๋‹ค. ===="
rm -r "./$content_name"/*
 
echo "==== $vault_name ์˜ vault์—์„œ publishing์„ ์›ํ•˜๋Š” ํ•ญ๋ชฉ๋งŒ $content_name folder๋กœ ์˜ฎ๊น๋‹ˆ๋‹ค. ===="
obsidian-export "../$vault_name" "./$content_name"
 
 
echo "==== $content_name ์œผ๋กœ ์ด๋™ํ•œ ํ•ญ๋ชฉ์„ ๋กœ์ปฌ ์„œ๋ฒ„์— ๋„์›๋‹ˆ๋‹ค. ===="
npx quartz build --serve

sync.sh

#!/bin/bash
 
content_name="content"
vault_name="World"
 
echo "\n ==== ๋ชจ๋“  $content_name folder์˜ ๋‚ด์šฉ์„ ์ง€์›๋‹ˆ๋‹ค. ===="
rm -r "./$content_name"/*
 
echo "==== $vault_name ์˜ vault์—์„œ publishing์„ ์›ํ•˜๋Š” ํ•ญ๋ชฉ๋งŒ $content_name folder๋กœ ์˜ฎ๊น๋‹ˆ๋‹ค. ===="
obsidian-export "../$vault_name" "./$content_name"
 
echo "==== $content_name ์œผ๋กœ ์ด๋™ํ•œ ํ•ญ๋ชฉ์„ ๋ฐฐํฌํ•ฉ๋‹ˆ๋‹ค. ===="
npx quartz sync

Reference