Quartzとは
-
個人が情報を整理して公開するのにピッタリなSSG
-
内部リンクの機能や、キーワードのグラフ表示ができることにより、情報の関連性を立体的に把握できる(たぶん)
-
BlogやSNSと異なり、個人の理解の深まりやテーマの広がりを徐々に表現することができる(たぶん)
-
このようなサイトをデジタル・ガーデンと言ったりするらしい
-
小生はタヌキなのでよくわからんが、タヌキなりに挑戦してみる
Quartz環境の構築
# githubからクローンして関連ライブラリインストール
cd Quartz
mkdir Site_1
cd Site_1
git clone https://github.com/jackyzha0/quartz.git
cd quartz
npm i
npx quartz create
# 対話メニュー起動するので、初期値のままEnter2回
T Quartz v4.4.0
o Choose how to initialize the content in `D:\Quartz\Site_1\quartz\content`
> Empty Quartz
o Choose how Quartz should resolve links in your content. This should match Obsidian's link format. You can change this…
> Treat links as shortest path
# サーバ起動
npx quartz build --serve
- ブラウザから確認: http://localhost:8080
- 停止: Ctrl +c
- あっさり起動、すばらしい
Quartzの設定
- XXX
コンテンツ作成
- /content フォルダの中に .md ファイルを書く
- .md ファイルは Obsidianを使って書くのが推奨
サイト公開
Github準備
- 本家:GitHubレポジトリの設定
- GitHub上でプライベートレポジトリ Quartz を作成
- README file、liesense、gitignoreを初期化しないように
- 生成されたレポジトリのurlをコピー
- クライアントのレポジトリを修正
# 確認
git remote -v
origin https://github.com/jackyzha0/quartz.git (fetch)
origin https://github.com/jackyzha0/quartz.git (push)
upstream https://github.com/jackyzha0/quartz.git (fetch)
upstream https://github.com/jackyzha0/quartz.git (push)
# originを生成したリポジトリに設定
git remote set-url origin https://github.com/Yunomori-Yuri/Quartz.git
# 変更の確認
>> git remote -v
origin https://github.com/Yunomori-Yuri/Quartz.git (fetch)
origin https://github.com/Yunomori-Yuri/Quartz.git (push)
upstream https://github.com/jackyzha0/quartz.git (fetch)
upstream https://github.com/jackyzha0/quartz.git (push)
- クライアントのデータをリポジトリにアップロードする
- Obsidianでcontent フォルダ内のファイルを触っているとはじき出されて一瞬ビビる
- GitHubの認証が走るので冷静にブラウザで認証、接続した
npx quartz sync --no-pull
# 実行結果
Quartz v4.4.0 bsite\quartz>
>> git remote -v
Backing up your contentcom/Yunomori-Yuri/Quartz.git (fetch)
[v4 f41349f] Quartz sync: Feb 19, 2025, 11:19 PMgit (push)
5 files changed, 103 insertions(+), 3 deletions(-).git (fetch)
delete mode 100644 content/.gitkeepackyzha0/quartz.git (push)
create mode 100644 content/Quartz.mdtz sync --no-pull
create mode 100644 content/index.md
create mode 100644 "content/\347\204\241\351\241\214\343\201\256\343\203\225\343\202\241\343\202\244\343\203\253.canvas"
Pushing your changes
info: please complete authentication in your browser...
Enumerating objects: 10302, done.
Counting objects: 100% (10302/10302), done.
Delta compression using up to 24 threads
Compressing objects: 100% (3656/3656), done.
Writing objects: 100% (10302/10302), 9.09 MiB | 8.64 MiB/s, done.
Total 10302 (delta 6547), reused 10281 (delta 6533), pack-reused 0
remote: Resolving deltas: 100% (6547/6547), done.
To https://github.com/Yunomori-Yuri/Quartz.git
* [new branch] v4 -> v4
branch 'v4' set up to track 'origin/v4'.
Done!
- 細かいことはタヌキだからよくわかんないけどうまくいったっぽい