ardumont / org2jekyll

Blogging with org-mode and jekyll without alien yaml headers.
GNU General Public License v2.0
71 stars 19 forks source link

Collection support #24

Closed carltonf closed 8 years ago

carltonf commented 9 years ago

Jekyll has support for collections: http://jekyllrb.com/docs/collections/ It's very useful if I want to create a topic page that list posts from a specific collection.

I've implemented basic features to have org2jekyll support collections, which works for my limited usage. Test cases have NOT been written yet.

As I see, some big changes are needed. Particularly the way org2jekyll determine the type of posts from the layout is changed. I don't think I've exhausted all necessary changes.

I need your opinion on including this collection feature and advice for improvements.

Thanks.

ardumont commented 9 years ago

Hello,

I have seen your PR but not yet understood it (because not I did not understand the jekyll's collections yet). I will take a look more seriously as soon as I can.

In the mean time, can you please rebase to the latest code (i've just pushed to add some more coverage)?

Cheers,

ardumont commented 9 years ago

So, I've read again the link you sent me but I still do not get it.

In any case, I'm not against integrating the notion since:

But, if you could, please:

Ideally:

I you cannot, please tell me :D

Thanks in advance

Cheers,

ardumont commented 9 years ago

Ah and also, from http://carltonf.github.io/from-octopress-to-jekyll/:

org2jekyll is the bridge between Org and Jekyll. There are some issues I'd like to see fixed and features to be implemented. 

Feel free to open as many issues as you can :D

Cheers,

carltonf commented 9 years ago

clarify the jekyll uses

Details are in line notes, but in short collection is a custom set of articles in parallel to posts and pages.

explain what's the rendered yaml supposed to look like

Jekyll uses configurations and subdirectory to manage collections, no extra markup needed.

Overall, I submit this request to see whether the feature and the direction of changing I made is acceptable. It's a preview, crude, many changes mix together. I do plan to improve it.

To clarify usage further below is my org publish project for wiki:

("wiki"
           :base-directory ,(org2jekyll-input-directory "org/wiki")
           :base-extension "org"
           :publishing-directory ,(org2jekyll-output-directory "_wiki")
           :publishing-function org-html-publish-to-html
           :headline-levels 4
           :section-numbers nil
           :with-toc nil
           :html-preamble t
           :recursive t
           :make-index t
           :html-extension "html"
           :body-only t)

Naturally it looks almost the same as pages and posts. The general idea is to match org publish project and collection(including pages and posts).

EDIT: why called TYPE? COLLECTION in Jekyll doesn't include pages and posts, so I feel it's better to use a different term in org. Generally the corresponding is "TYPE" <-> "Org Publish Project" <-> "Collection"(including pages and posts), but this mapping is not strict.

carltonf commented 8 years ago

Sorry for the long period of silence. I've started writing posts directly in Markdown and have not used org2jekyll for quite a while.

Thanks again for the discussion and sorry for not being able to carry this pull request through.

ardumont commented 8 years ago

On Mon, Feb 29, 2016, 8:19 AM Carl Xiong notifications@github.com wrote:

Sorry for the long period of silence. I've started writing posts directly in Markdown and have not used org2jekyll for quite a while.

Thanks again for the discussion and sorry for not being able to carry this pull request through.

Hello, no problem. Thanks for the discussion.

— Reply to this email directly or view it on GitHub https://github.com/ardumont/org2jekyll/pull/24#issuecomment-190072908.