Skip to content

Commit

Permalink
Don't overwrite index.md files with mkdocs new
Browse files Browse the repository at this point in the history
  • Loading branch information
d0ugal committed Apr 4, 2015
1 parent 590c56f commit a3c4974
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mkdocs/new.py
Expand Up @@ -45,6 +45,9 @@ def new(args, options):
print('Writing config file: %s' % config_path)
open(config_path, 'w').write(config_text)

if os.path.exists(index_path):
return

print('Writing initial docs: %s' % index_path)
if not os.path.exists(docs_dir):
os.mkdir(docs_dir)
Expand Down

0 comments on commit a3c4974

Please sign in to comment.