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

wordpress: import draft posts into _drafts folder #147

Merged
merged 1 commit into from Jun 8, 2014

Conversation

Projects
None yet
3 participants
@willnorris
Contributor

willnorris commented Jun 4, 2014

Use simple title for file, as noted on http://jekyllrb.com/docs/drafts/. We also omit the the 'published' key in the head matter so that drafts can be previewed using jekyll build --drafts without also having to specify the --unpublished flag.

import draft posts into _drafts folder
Use simple title for file, as noted on http://jekyllrb.com/docs/drafts/.
We also omit the the 'published' key in the head matter so that drafts
can be previewed using `jekyll build --drafts` without also having to
specify the --unpublished flag.
@@ -292,7 +293,7 @@ def self.process_post(post, db, options, page_name_list)
data = {
'layout' => post[:type].to_s,
'status' => post[:status].to_s,
'published' => (post[:status].to_s == "publish"),
'published' => post[:status].to_s == 'draft' ? nil : (post[:status].to_s == 'publish'),

This comment has been minimized.

@parkr

parkr Jun 5, 2014

Member

Should this be false instead of nil?

@parkr

parkr Jun 5, 2014

Member

Should this be false instead of nil?

This comment has been minimized.

@willnorris

willnorris Jun 8, 2014

Contributor

By virtue of being in the _drafts folder, these posts are already skipped when generating the site unless the --drafts flag is passed. Additionally marking it as unpublished doesn't seem to accomplish much... it just means you have to pass both --drafts and --unpublished. There's no mention of the --unpublished flag in the drafts docs, which leads me to believe that the expectation is that it drafts aren't marked as "unpublished"

@willnorris

willnorris Jun 8, 2014

Contributor

By virtue of being in the _drafts folder, these posts are already skipped when generating the site unless the --drafts flag is passed. Additionally marking it as unpublished doesn't seem to accomplish much... it just means you have to pass both --drafts and --unpublished. There's no mention of the --unpublished flag in the drafts docs, which leads me to believe that the expectation is that it drafts aren't marked as "unpublished"

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jun 5, 2014

Member

Awesome!! Just one comment.

Member

parkr commented Jun 5, 2014

Awesome!! Just one comment.

parkr added a commit that referenced this pull request Jun 8, 2014

@parkr parkr merged commit 86fb1af into jekyll:master Jun 8, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

parkr added a commit that referenced this pull request Jun 8, 2014

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jun 8, 2014

Member

Thank you!

Member

parkr commented Jun 8, 2014

Thank you!

@willnorris willnorris deleted the willnorris:drafts branch Jun 15, 2014

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.