claudehenchoz / dendron-hugo-export

Some scripts to export a Dendron vault for publishing with Hugo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dendron-hugo-export

These are some quick-and-dirty scripts to export notes from a Dendron vault into a hierarchy of files and folders intended for publishing with Huge.

The scripts

  • Export notes from a Dendron vault into a hierarchy of files/folders in the local filesystem
    • Exclude a configurable set of hierarchies and files.
    • Create _index.md files within folders as needed by Hugo.
    • Add the date frontmatter variable to each exported note, so that Hugo can set the publish date.
  • Process wikilinks like [[label | pqr.abc.xyz.md ]] in Dendron notes into a format that is preferred by Hugo: [label]({{< ref "pqr/abc/xyz.md" >}}).
  • Adds a Backlinks section to each note if backlinks to that note exist.

These notes are meant to be executed in a particular sequence. See the file dendron-export.sh. Also, you'll need to configure the vault path, destdir, and exclude dirs and files in each Python script.

WARNING: The scripts are extremely immature. They were cobbled together by copy/paste'ing code from StackOverflow and may fail without warning in all sorts of edge cases. I stopped working on them as soon as they started working for my own use cases. :)

About

Some scripts to export a Dendron vault for publishing with Hugo

License:MIT License


Languages

Language:Python 96.9%Language:Shell 3.1%