Spacemacsでorg-roamを使い続けるぞ!!(その3)

org-roamの作者のJethro's Braindumpを覗くと

To convert all Org files into Markdown, run: ./build.py

build.py is simple enough to inspect. Once the Markdown files are generated,

we can use Hugo to generate the website.」と有り

少しorg-roamからのさらなる応用範囲が見え隠れしている。

いずれ「My Org Roam Notes Workflow - Hugo Cisneros」此処に

ある様な「Note graph screenshot」が作成できればと願っている。

その為のステップアップとしてHugoを利用したspacemacsの

org-roamのファイルのエキスポートの理解が必須。

Jethro氏はHugoを利用して自分のサイトも作成している。

 

[jethrokuan/braindump: knowledge repository managed with org-mode and org-roam.]

org-roamを使いox-hugoでローカル・サイトに

exportを実施してみた。

以前hugoを使用しての静的サイトの導入を試したことがある。

[kaushalmodi/ox-hugo: A carefully crafted Org exporter back-end for Hugo]

ここを参考に、先ず

dotspacemacs-configuration-layers

(org :variables

                  org-enable-hugo-support t) を追加。

 HUGO_BASE_DIRと書いてあるRoot directory

 以前様々なサイトの作成を練習していたので

 今回は改めて「~/hugo/content/<HUGO_SECTION>/」に

 相当する場所へのエキスポートを実行してもらうために

 This property can be set by one of two ways:

 

Setting the #+hugo_base_dir: keyword in the Org file.

Setting the org-hugo-base-dir variable in a .dir-locals.el

or File Local Variables.での最初のorgファイルへの書き込みで実施。

                

 ルートディレクトリーの名称を間違えてしまい、

org-roamで作成した筈のmdへ変換したファイルが

見つからない。

~/hugo/content/」やら「~/hugo/content/section」やら

orgファイルへ書き込んで「C-c C-e H H」でのエキスポート

先を表示してくれているミニ・バッファでの場所が違う!

Finder>Documents >関係エキスポート先を

探しても見つからず、エキスポートが機能していない?

など良からぬことばかり頭を過る。

どっこい!似た様なフォルダー名が有ったので、

開いてみると『エキスポート』が実行されている。

しかし元々hugoをインストール指定した場所ではないので

此処からは「hugo server -D」でファイルを確認できない。

振り出しに戻って、

orgファイル

:PROPATIES:

:ID:

:END:

もう一度ルート・ディレクトリを:ID:の間に追記し、

「C-c C-e H H」でのエキスポート。

[ localhost:1313 ]でブラウザを開くと、

Spacemacs org-roamで追記、エキスポートした

mdファイルも無事確認できた。

-----

使用環境はOS10.14.6 Mojave 

/usr/local/Cellar/hugo/0.80.0

kaushalmodi/ox-hugo: A carefully crafted Org exporter back-end for Hugo

からoz-hugoのセッティングを流用。

If you want to enable auto-exporting for the whole project,

add this to the .dir-locals.el file in the project root:

と書かれている「.dir-locals.el file」については、何処に追加?

するか不明なのでまだ試していない。