Skip to content

Commit

Permalink
Rename index.yml -> extra-docs.yml.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed May 22, 2021
1 parent cdbfcfd commit cbaa129
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions antsibull/docsite_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ def load_section(yaml_section: t.Dict[str, t.Any], section_index: int = 0

def load_docsite_index(index_path: str, report_not_existing: bool = False
) -> t.Tuple[t.List[Section], t.List[str]]:
'''Load a docsite index.yml file.
'''Load a docsite extra-docs.yml file.
:arg index_path: Path to index.yml (does not need to exist).
:arg report_not_existing: Whether to report when index.yml does not exist.
:arg index_path: Path to extra-docs.yml (does not need to exist).
:arg report_not_existing: Whether to report when extra-docs.yml does not exist.
:returns: A tuple consisting of a list of sections and a list of error messages.
'''
sections: t.List[Section] = []
Expand All @@ -188,7 +188,7 @@ def load_docsite_index(index_path: str, report_not_existing: bool = False
except Exception as e:
errors.append(str(e))
elif report_not_existing:
errors.append('index.yml does not exist')
errors.append('extra-docs.yml does not exist')

return sections, errors

Expand All @@ -208,7 +208,7 @@ async def load_collection_docsite(collection_name: str,
flog = mlog.fields(func='load_collection_docsite')
flog.debug('Enter')

index_path = os.path.join(collection_metadata.path, 'docs', 'docsite', 'index.yml')
index_path = os.path.join(collection_metadata.path, 'docs', 'docsite', 'extra-docs.yml')
sections, _ = load_docsite_index(index_path)
for section in sections:
for i, toctree in enumerate(section.toctree):
Expand Down
2 changes: 1 addition & 1 deletion antsibull/lint_docsite_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def lint_collection_docsite_files(path_to_collection: str) -> t.List[t.Tuple[str
result.extend((doc[0], line, col, msg) for (line, col, msg) in errors)
except Exception as e:
result.append((doc[0], 0, 0, str(e)))
index_path = os.path.join(path_to_collection, 'docs', 'docsite', 'index.yml')
index_path = os.path.join(path_to_collection, 'docs', 'docsite', 'extra-docs.yml')
sections, errors = load_docsite_index(index_path, report_not_existing=len(docs) > 0)
result.extend((index_path, 0, 0, error) for error in errors)
label_prefix = get_label_prefix(collection_name)
Expand Down

0 comments on commit cbaa129

Please sign in to comment.