-
Notifications
You must be signed in to change notification settings - Fork 19
Allows for the usage of new front matter variables - rebased + refactor #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Use predicate nature of org2jekyll-article-p to remove need for org2jekyll-layout, and turn org2jekyll-article-p into a function.
Rename org-to-yaml-metadata to org-to-jekyll-metadata as this function is intended to translate org keywords to their jekyll equivalents. The translation table is locally scoped as it is only useful within org-to-jekyll-metadata. While there is only one key in the translation table, it's important to make it simple to add more if needed.
Keep Org-only options that have no meaning to Jekyll from leaking into the final Jekyll front matter.
org2jekyll.el
Outdated
| ("description" . 'mandatory) | ||
| ("author") | ||
| ("layout" . 'mandatory))) | ||
| (setq org2jekyll-header-metadata '((:title . 'mandatory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I liked the defvar, it's to avoid a warning at installation time.
I voluntarily declared it nil and set it after for dev reasons. When i was not yet sure of what i should put in there.
It should even be a defconst now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
|
Hello again, One note, you could have forced push on the #40 PR. This seems good thanks. One question to make sure i understood right. For example, to add this: scheme-text: "#0029ff"
scheme-link: "#ff00b4"I just add in the org file: #+scheme-text: "#0029ff"
#+scheme-link: "#ff00b4"And when exported, we'll have the expected yaml. Did i understand right? |
Renamed mandatory to required. Adjusted comments, and renamed a few other symbols to more clearly express their purpose.
|
I felt hesitant to force push to PR #40 because I ended up creating a new branch and manually reimplementing the original PR instead of using interactive rebase - it was too much of a mess! I wasn't thrilled about creating a new PR, but I didn't want to risk obfuscating the original PR and discussion. Will definitely keep force push on hand for future work. Yes, your interpretation is correct. Although the convention for Org mode's special lines seems to be all caps. The PR downcases as part of the transformation, so the result should be the same and less jarring with: Input: #+SCHEME-TEXT: "#0029ff"
#+SCHEME-LINK: "#ff00b4"Output: scheme-text: "#0029ff"
scheme-link: "#ff00b4" |
Yes, indeed. It is my experience org's ok with lower case as well. I'll adapt the README.org Cheers, |
Thanks @halcyon for the great work.
Thanks @halcyon for the great work.
Rebased version of PR #40, which addresses issues #35 and #36.