#NEWLINE# def create_content( name , path = None ) : #NEWLINE# #INDENT# path = os . path . join ( ( path or CONTENT_REPO ) , name ) #NEWLINE# if ( not os . path . isdir ( path ) ) : #NEWLINE# #INDENT# os . makedirs ( path ) #NEWLINE# #UNINDENT# with open ( os . path . join ( name , 'index.md' ) , 'w' ) as fp : #NEWLINE# #INDENT# fp . write ( '\n' . join ( ( 'title: Index' , '' , 'Just an index' ) ) ) #NEWLINE# #UNINDENT# with open ( os . path . join ( path , 'foo.md' ) , 'w' ) as fp : #NEWLINE# #INDENT# fp . write ( '\n' . join ( ( 'title: This is Foo' , '' , 'Just foo' ) ) )