Skip to content

Commit

Permalink
Fixes #419 showing drafts in development
Browse files Browse the repository at this point in the history
This should make draft posts show up.
  • Loading branch information
LightGuard committed Oct 24, 2014
1 parent 75d9aff commit 5bc3ce9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/awestruct/page_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def load_all(prepare=:inline)
unless path.directory?
$LOG.debug "loading #{relative_path}" if (site.config.verbose) if $LOG.debug?
page = load_page( path, prepare )
if ( page && (!page.draft || @site.show_drafts) )
if ( page )
next if (page.draft && !(@site.show_drafts || @site.profile == 'development'))
$LOG.debug "loaded! #{path} and added to site" if $LOG.debug?
#inherit_front_matter( page )
site.send( @target ) << page
Expand Down

0 comments on commit 5bc3ce9

Please sign in to comment.