ar.falsy.cat

Search

Search IconIcon to open search

ObsidianとQuartzによるセカンドブレインデジタルガーデンの構築

Last updated Feb 24, 2023

# 概要

# 初期設定

  1. Quartzをforkする
  2. GitHub Actionsを有効化
  3. repoの設定でworkflow permissionread and write permissionsへ変更
    • これしないとdeployに失敗する
  4. repoをローカルにclone
  5. data/config.yamlをいい感じに編集
    • authorなど
  6. config.tomlをいい感じに編集
    • baseURLなど
  7. pushする
  8. deployが終わったらGitHub Pagesのドメイン設定をする

# 記事の執筆

  1. ローカルrepoのcontent/ディレクトリをVaultとしてObisidianで開く
    • content/templates/は弄ってはいけない
  2. 記事を書く
  3. pushする

# ローカルプレビュー

# カスタマイズ

# Recent Notesの表示数を変更する

  1. layouts/partials/recent.htmlfirst 3 $notesを変更する

# トップページにグローバルグラフを表示する

  1. data/graphConfig.yamlenableGlobalGraphtrueにする

# 記事にRelated Notesを表示する

  1. layouts/partials/recent.htmlを作成
  2. layouts/_default/single.htmlの好きな位置に{{partial "related.html" .}}を挿入
  3. i18n/en.tomlrelated_notesの翻訳を追加

layouts/partials/recent.html

1
2
3
4
5
<div class="content-list">
  <h2>{{ i18n "related_notes" }}</h2>
  {{$notes := .Site.RegularPages.Related .}}
  {{partial "page-list.html" (first 3 $notes)}}
</div>

# 所感