nobiot / md-roam

Use Org-roam with markdown files by adding Md-roam as a plug-in. Mix org and markdown files in a single Org-roam database.
GNU General Public License v3.0
333 stars 15 forks source link

(feat) Add support for aliases in YAML front matter #11

Closed nobiot closed 4 years ago

nobiot commented 4 years ago

Motivation #8. Add support for aliases in YAML front matter. Need more testing; it's late in the night.

This commit also changes the way regular expression is run. It should now delineate the front matter correctly with the beginning and ending ---, and runs regular expression within it only.

Aliases can also be found either the key roam-alias:, or #+ROAM_ALIAS:. The key should be case insensitive by default, but this should be controlled by Emacs's standard variable: case-fold-search (confirmed. It's buffer-specific. The default ignores case -- case insensitive. You can use toggle-case-fold-search to toggle).

The front matter should be something like:

---
title: this is the title: subtitle
date: 2020-05-17
other_key: value
roam_alias: "alias 1" "alias 2" "alias 3"
---