Added the ability to build "published: false" posts (for review before pushing to production). Related to Issue 41. #374

Closed
wants to merge 3 commits into
from

Projects

None yet

7 participants

@ojilles

Added the ability to still build posts that have "published: false" in their
front matter. By including "prod_build: false" in _config.yml unpublished posts
will get build. This is ideal for:

  • Checking out if the layout, etc, works out for your draft post, without publishing it to "production"
  • One can use this setting for other uses as well. For example, one can exclude Disqus integration when prod_build is false in your layout file.

Tests included. Related to Issue 41.

spk and others added some commits Jul 10, 2011
@spk spk Generate escaped url for categories with space.
Space in URLs should be encoded.

Signed-off-by: Laurent Arnoud <laurent@spkdev.net>
1356e75
@ojilles ojilles Added the ability to still build posts that have "published: false" i…
…n their

front matter. By including "prod_build: false" in _config.yml unpublished posts
will get build. This is ideal for:
 * Checking out if the layout, etc, works out for your draft post, without
   publishing it to "production"
 * One can use this setting for other uses as well. For example, one
   can exclude Disqus integration when prod_build is false in your
   layout file.

Tests included. Related to Issue 41.
a26622b
@ojilles

The default is "true" so that in all cases the behaviour of Jekyll stays the same, except when someone sets "prod_build: false" in they _config.yml. (And for that I included a test)

@ojilles

Also, let me know if you're going to go ahead and merge this. If you do, give me a shout and I'll update the wiki documentation for you.

@mojombo

This seems like a useful feature, but I think it would be better handled by a command line flag named --preview or something. I don't see any reason to ever specify that in the _config file and indeed to do so would be very dangerous if you forgot it was there and pushed your code to an auto-building server like GitHub Pages.

@sindresorhus

I'm with @mojombo. A flag would be the best solution.

@ojilles
@mixonic

Please see #513 for another implementation (with command line flag).

@parkr
Jekyll member

We're going to use something like a drafts feature for this instead, as this is the general use-case for wanting to build a post you previously flagged as do-not-publish.

@parkr parkr closed this Feb 7, 2013
@nfisher

I know this is a little stale now but, I think the _config.yml prod_build option would be useful if it generated the html but, did not include the article in the posts collection. This would allow a "soft launch" of the article that could be published to your blog for review by others before sharing it with the world in any RSS, or landing pages.

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