#NEWLINE# def begin_site( self ) : #NEWLINE# #INDENT# in_production = self . site . config . mode . startswith ( 'prod' ) #NEWLINE# if ( not in_production ) : #NEWLINE# #INDENT# self . logger . info ( 'Generating draft posts as the site isnot in production mode.' ) #NEWLINE# return #NEWLINE# #UNINDENT# for resource in self . site . content . walk_resources ( ) : #NEWLINE# #INDENT# if ( not resource . is_processable ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# is_draft = resource . meta . is_draft #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# is_draft = False #NEWLINE# #UNINDENT# if is_draft : #NEWLINE# #INDENT# resource . is_processable = False #NEWLINE# #UNINDENT# self . logger . info ( ( '%s is%s draft' % ( resource , ( '' if is_draft else ' not' ) ) ) )