Skip to content

Commit

Permalink
logging if index.md and readme.md are located in same folder #1694 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
andmos authored and waylan committed Dec 5, 2018
1 parent e394169 commit cc03fd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mkdocs/structure/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ def get_files(config):
# Skip any excluded files
if _filter_paths(basename=filename, path=path, is_dir=False, exclude=exclude):
continue
# Skip README.md is an index file also exists in dir
# Skip README.md if an index file also exists in dir
if filename.lower() == 'readme.md' and 'index.md' in filenames:
log.warning("Both index.md and readme.md found. Skipping readme.md from {}".format(source_dir))
continue
files.append(File(path, config['docs_dir'], config['site_dir'], config['use_directory_urls']))

Expand Down

0 comments on commit cc03fd0

Please sign in to comment.