Open sati-bodhi opened 1 year ago
A quick hack fixes the problem. Just search for the next #
after (point-min)
.
(defun org2jekyll-get-options-from-buffer ()
"Return special lines at the beginning of current buffer."
(let ((special-line-regex "^#\\+\\(.+\\):[ \t]+\\(.*\\)$")
(get-current-line (lambda ()
(buffer-substring-no-properties (line-beginning-position)
(line-end-position))))
(options-plist))
(save-excursion
(goto-char (point-min))
(search-forward "#")
(catch 'break
(while (string-match special-line-regex (funcall get-current-line))
(let ((current-line (funcall get-current-line)))
(unless (s-blank-str-p (match-string 2 current-line))
(setq options-plist (plist-put options-plist
(->> current-line
(match-string 1)
downcase
(concat ":")
intern)
(match-string 2 current-line)))))
(unless (= 0 (forward-line))
(throw 'break nil))))
options-plist)))
Hello,
Can you please provide the following information?
Thanks in advance.
bug?
I would like to use
org2jekyll
in conjunction withorg-roam
to publish some of my notes. Allorg-roam
nodes start with a:PROPERTIES:
drawer, which somehow fails the test oforg2jekyll-get-options-from-buffer
and returnsnil
, breaking the publish function.M-x org2jekyll-bug-report
Expected behavior
Article is published to jekyll
_posts
folder, as expected.Actual behavior
Error:
Steps to reproduce the behavior
Publish an article in
org-roam
with the relevant file headings.Improvments?
What do you want?
Tweak the
org2jekyll-get-options-from-buffer
function to allow more flexibility.Why is it better?
Users can build their blog using
org-roam
.Thanks for sharing!
Cheers,