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

Move modules to beginning of plugin index #336

Merged
merged 4 commits into from
Nov 15, 2021

Conversation

felixfontein
Copy link
Collaborator

@felixfontein felixfontein commented Nov 14, 2021

Improved version over #334.

Fixes #331.

Copy link
Contributor

@briantist briantist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! TIL about Jinja macros

Comment on lines +6 to +8
{% for name, desc in plugin_maps[plugin_type].items() | sort %}
* :ref:`@{ name }@ <ansible_collections.@{ collection_name }@.@{ name }@_@{ plugin_type }@>` -- @{ desc | rst_ify | indent(width=2) }@
{% endfor %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this was sort of moved from another place so it's just doing what was already there, but what is the extra spacing for inside {% on some elements? Does that control indentation somehow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's basically a visual help for readers. You can see that this is part of another block. (Indenting the {% itself is not a good idea since that results in extra whitespace in the output.)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an alternative to whitespace inside the brackets, it's also possible to use {%- and -%} to suppress the extra whitespace.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tremble true, but the - quickly eats too much whitespace (like newlines as well).

@felixfontein felixfontein merged commit f047625 into ansible-community:main Nov 15, 2021
@felixfontein felixfontein deleted the order-2 branch November 15, 2021 19:05
@felixfontein
Copy link
Collaborator Author

@briantist @tremble thanks for reviewing!

@felixfontein
Copy link
Collaborator Author

And @ariordan-redhat thanks for bringing this up!

@samccann
Copy link
Contributor

Just generated (from the PR) locally and looks good:

image

Copy link
Contributor

@samccann samccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output lgtm!

@felixfontein
Copy link
Collaborator Author

@samccann thanks for testing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs survey feedback: move modules to the top of the collection docs template
4 participants