Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always write environment variable index; add it to index.rst generated by sphinx-init #80

Merged
merged 1 commit into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/80-sphinx-init-env-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- "The default ``index.rst`` created by ``antsibull-docs sphinx-init`` includes the new environment variable index (https://github.com/ansible-community/antsibull-docs/pull/80)."
9 changes: 3 additions & 6 deletions src/antsibull_docs/cli/doc_commands/stable.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,9 @@ def generate_docs_for_all_collections(venv: t.Union[VenvRunner, FakeVenvRunner],
squash_hierarchy=squash_hierarchy))
flog.debug('Finished writing extra docs')

if referenced_env_vars:
asyncio_run(output_environment_variables(dest_dir, referenced_env_vars,
squash_hierarchy=squash_hierarchy))
flog.debug('Finished writing environment variables')
else:
flog.debug('Skipping environment variables (as there are none)')
asyncio_run(output_environment_variables(dest_dir, referenced_env_vars,
squash_hierarchy=squash_hierarchy))
flog.debug('Finished writing environment variables')
return 0


Expand Down
2 changes: 2 additions & 0 deletions src/antsibull_docs/data/docsite/list_of_env_variables.rst.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ Environment variables used by the ansible-core configuation are documented in :r
{% endif -%}
{%- endfor %}

{% else %}
No environment variables have been defined.
{% endfor %}
7 changes: 7 additions & 0 deletions src/antsibull_docs/data/sphinx_init/rst_index_rst.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@ This docsite contains documentation of some collections.
:glob:

collections/index_*


.. toctree::
:maxdepth: 1
:caption: Reference indexes:

collections/environment_variables