-
Notifications
You must be signed in to change notification settings - Fork 19
Allows for the usage of new front matter variables #40
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
New front matter variables can be used without having to modify org2jekyll. This change transforms special lines at the top of the org file into Jekyll front matter. Special lines that only have a meaning in Org mode are excluded.
|
Hello, Thanks for the PR, i need some time to ingest it though. In your description, I don't get the expression
No problem.
That's good, indeed.
I don't understand this sentence.
Good point. Cheers, |
Thanks for your quick response, I appreciate you taking the time to look it over and discuss.
Yes, front matter is the YAML at the top of Jekyll pages.
Org special lines are described in the Org manual as, "...lines in the buffer to define settings on a per-file basis. These lines start with a ‘#+’ followed by a keyword, a colon, and then individual words defining a setting." While they serve a similar purpose as Jekyll's front matter, they differ in that they can also be used anywhere in an Org document for things that wouldn't make sense to set globally for the entire document - such as syntax highlighting some source code in the middle of the document with #+BEGIN_SRC: and #+END_SRC:. As a result of this, it would make sense to only retrieve the Org special lines that are at the top of the document - where they are analogous to front matter. This is important, because you wouldn't want properties relating only to formatting a section of an Org document to be copied into the Jekyll front matter. Searching only the top of the document should also yield a nominal performance improvement. Currently, only predefined Org special lines are found. In the PR I've added a regular expression that will find any Org special line - this is what I meant by it being more generalized. |
Well, how can we achieve improvments without discussion? ^^
Thanks for the explanation and the link.
Thanks. I thought i took care of that. I need to take a closer look at your PR.
Indeed.
Ok... Ah yes, i see now. Indeed. Thus your initial remark Do you think you can take a stab at rebasing to the latest code or is it too much of a hassle? Thanks anyway. |
|
Sure, I can do that. Would you be ok with me removing the recently added extra-yaml feature when I rebase? I'll also break the changes up into smaller commits so it's easier to examine. |
Sure, we'll need to update the readme accordingly (either you or me). |
|
Cool, sounds good - team work! 😃 |
Indeed ^^ |
|
cf. #41 for the follow-up. |
Antoine, I apologize for not submitting this pull request for you to look over sooner. I have been ill, and have only recently recovered.
I had a use case similar to that of the other person who needed to be able to use customized front-matter. As I dug into the issue, I did some refactoring that you might find beneficial.
Notable changes
Looking forward to your thoughts.