Commit Graph

40 Commits (153c9bd539eeffdd6d395b8840f95d56e3814f27)

Author SHA1 Message Date
Dag Wieers cdf9e39647 Fix the automatic docsite_pr label (#37999) 6 years ago
Toshio Kuratomi 8f1b5fc47b Add alias's as a :ref: target for modules
This is especially important for deprecated modules as we want to link
to those in porting guides and such.
6 years ago
Dag Wieers 69c0f96112 Fix nested parameters in module docs (#37793) 6 years ago
Brian Coca 06b70f1614 Revert "Add a few Jinja2 tests to simplify template (#37514)"
This reverts commit b8e07f0d6e.
6 years ago
Dag Wieers b8e07f0d6e
Add a few Jinja2 tests to simplify template (#37514)
Add list test to simplify template
6 years ago
Dag Wieers e691e07646 Fix boolean input and string-type validation 6 years ago
Dag Wieers 80ba7b7402 Various module doc fixes (#37256)
This PR includes:
- A fix for multiple-choice defaults
- A fix for messed up dictionary samples
- Cleaner defaults when they don't appear part of choices
6 years ago
Dag Wieers 8f2c87231f Ensure the table spans the complete page width (#37129) 6 years ago
Dag Wieers 6636401246 Improve default values and choices in module docs (#36901)
* Improve default values and choices in module docs

So currently we show defaults and choices in separate columns.

For each parameter we have
- Mostly empty default and choices cells
- A list of choices and a separate default value
- Only a default value

So there's a lot of space being wasted on empty cells.
We can do this better.

* Improve Parameters section

* Add Choices back into column header

* Ensure the tables spans the complete page width
6 years ago
Dag Wieers eb52a88fb6 Improve module docs return values (#36943)
* Improve module docs return values

Currently the 5 columns shown doesn't make optimal use of the screen
estate, especially for facts modules this is a problem.

* Add returned facts as a separate section

* Remove whitespace and add support section

Since Notes were moved higher up, the Author, Status and Maintainer
information was now placed under the Return Values section.

* Switch Last Updated and Copyright
6 years ago
Dag Wieers 6601e78dfa
Wrong syntax 6 years ago
Dag Wieers eae0aa0592 Automatically stuff reference in commit message (#36844)
* Automatically stuff reference in commit message

So we probably want to track which edits were performed through the
Github interface, and this change automatically adds a label to the
commit message.

```yaml
<!--- Your description here -->

+label: docsite_pr
```

Eventually this allows to (on regular basis) list the changes from
documentation readers and process them in a separate process.
6 years ago
Dag Wieers 629278464f Improve contribute-message in document footer (#36841) 6 years ago
Dag Wieers 3b27d723fb Fix indentation of requirements (#36813)
Just discovered that the requirements were indented, whereas all other
lists were not. This makes them stand out for no good reason.
6 years ago
Dag Wieers 38abda544f Improve module docs wrt. required params (#36812)
So I am still not satisfied with how required parameters are being
displayed (before it was yes/no, then it became required/optional, and
only required).

Now it will display in small green 'required' under the parameter name.
This is more convenient, and provides more room for the description.
Especially on smaller screens.
6 years ago
Dag Wieers 974c50a417 Move notes higher up in order (#36815)
So people reading the module documentation usually look for parameters
first, and are interested in examples. However the notes are at the very
end even below the Return Values (the least interesting part).

So this change moves the notes higher up, below parameters, but before
examples so people at least see the notes.
6 years ago
Dag Wieers 4ff0317f3e
Improve module doc parameter list (#36688)
This PR includes:
- Indentation of Jinja constructs
- Put parameter name in bold
- Title-case table headers
- Show 'required' when parameter is required (not yes/no)
- Left-align all values
6 years ago
Dag Wieers 7cf08e9986
Improve parameter required values and ref fix (#36680)
This PR includes:
- An improvement to the parameter listing, where instead of yes/no, it
  is indicated with required/optional (easier when scrolling through a
  long list of parameters)
- Ensure that module reference, eg. M(foobar) do not include the module
  document title
6 years ago
Dag Wieers 3016bc7351
Asorted docs fixed (#36672)
This PR includes:
- A fix to untemplated {{ plugin_type }} in docs
- Remove the additional info on how to edit module docs (see #36667)
- Add missing delimiter
6 years ago
Dag Wieers ba370b178d
docsite: Add 'Edit on GitHub' for module docs (#36667)
This is something I always wanted, a 'Edit on GitHub' button for module
documentation.

I also removed the additional statement in the footer with instructions
on how to edit the module documentation.

PS The links go directly into the GitHub file editor now !
6 years ago
scottb 373b1dcf59
Core Docs Refactor and Redesign (#36067)
* Docs refactor as outlined in https://github.com/ansible/proposals/issues/79. Moves content into 'guides'; refactors TOC; fixes CSS; design tweaks to layout and CSS; fixes generated plugin, CLI and module docs to fix links accodingly; more.

* Adding extra blank line for shippable
6 years ago
John R Barker a23c95023b
Module deprecation: docs, scheme and tests (#34100)
Enforce module deprecation.
After module has reached the end of it's deprecation cycle we will replace it with a docs stub.

* Replace deprecated modules with docs-only sub
* Use of deprecated past deprecation cycle gives meaningful message (see examples below)
* Enforce documentation.deprecation dict via `schema.py`
* Update `ansible-doc` and web docs to display documentation.deprecation
* Document that structure in `dev_guide`
* Ensure that all modules starting with `_` have a `deprecation:` block
* Ensure `deprecation:` block is only used on modules that start with `_`
* `removed_in` A string which represents when this module needs **deleting**
* CHANGELOG.md and porting_guide_2.5.rst list removed modules as well as alternatives
* CHANGELOG.md links to porting guide index

To ensure that meaningful messages are given to the user if they try to use a module at the end of it's deprecation cycle we enforce the module to contain:
```python
if __name__ == '__main__':
    removed_module()
```
7 years ago
Dag Wieers 1719267779 Sort arguments and return values in module docs
Comparing the old module docs, with the devel docs the
options/arguments/parameters are no longer sorted.

Also, both in the old module docs and the devel docs the result values
are not sorted where they probably should.
7 years ago
Abhijeet Kasurde f58d9da703 Update link in common footer (#34397)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
John R Barker 7381554e42 Compact documentation (#34081)
Before this fix lists of `documentation:` were in individual <p> tags
causing a lot of whitespace on the rendered _module.html pages.
7 years ago
Jordan Borean 0880297909 fix options output for bool type (#34074) 7 years ago
Wolfgang Felbermeier 817a5efff9 Fix css of elbow indentation for firefox (#33225) 7 years ago
Wolfgang Felbermeier 496ce388ab documentation: render nested return dicts for more then one level (#33143)
* Render nested return value documentation for more then one level
in the generated webdocs.

* Remove unnecessary code and cleanup

* Implement recursive option documentation

* Build elbow intendation style for options and return documentation
7 years ago
Brian Coca afc460c943 tollerate 'string' descriptions 7 years ago
Ed Santiago 47fb002c88 (minor) fix broken link, awkward phrasing (#32085)
* (minor) fix broken link, awkward phrasing

Simple transposition error was resulting in a link not
being properly htmlified.

Also clean up redundant 'this' and trailing whitespace.

Signed-off-by: Ed Santiago <santiago@redhat.com>

* Edits
7 years ago
Brian Coca 2ed46e04f4 more updates to plugin/config generation (#30787)
* fixed module generation

added missing lookup page
point to plugins when plugins
made modules singular
add display for verbose an debug messages
nicer templating, changed generation order for ref
corrected links
moved most of lookup docs to plugin section

* Copy edits
* Fixed typos
* Clarified wording
7 years ago
sduthil 15dffe04dd fix misformatted docsite link (#31384)
reason: The link is showing verbatim in the docs, where it should only
show "knowledge base article".

Also, generating the docs shows a lot of:

docs/docsite/rst/win_acl_module.rst:424: WARNING: Unknown target name: "know ledge base article<https://access.redhat.com/articles/rhel-top-support-policies>".
7 years ago
Adrian Likins da15cf1f54 Generate plugin rst (#28901)
Generate rst docs for plugins 

Based on rst generated for modules. But generated plugin
docs go into docs/docsite/rst/plugins/$PLUGIN_TYPE/plugin_name.rst
( docs/docsite/rst/plugins/connection/ssh.py for ex)

* move plugins docs to rst/*_plugins/ subdirs for namespace
* Only gen support pages for modules for now.
* Add generated plugin docs to gitignore* add list_*_plugins templates
* support MODULES/PLUGINS filters for make htmldocs

   Add a 'PLUGINS=ssh' filter env var like MODULES to filter plugins to build docs for.

* fixup 'historical' version_added, skip plugins/loader.py
* Fix plugins_by_support ref link to new plugins/*/ location
* use :ref: for common_return_values, allow empty version_added
* warnings on missing doc info
* add a prefix to _random_choice
  It was colliding with the target for random_choice plugin
7 years ago
Toshio Kuratomi 40ea448c7b Misc docs fixes
* Revise and link inline to the lists of modules

* Fix jinja2 objects.inv fallback path

* Fix bolding of deprecation marker

* Change module_support to link to lists via :doc:
  That links to the top of the page instead of a section.

* Add a short text for each list of maintained modules
* Change maintenance info to only display on core and network modules
7 years ago
Jiri Tyr 5660b18b6a Adding missing period into the module doc template 7 years ago
Andreas Maier b900f4a3be Fixed return table in module docs generated by plugin_formatter.py (#25329) (#25330)
This change fixes two issues with the generated return table:

1. When specifying a list of strings in the 'description' field of a
   return value, it shows them in Python list syntax on the resulting
   web page, e.g. `['a', 'b', 'c']`.
2. When specifying more than one line for the 'sample' field, the
   result table gets damaged in the HTML output.

In addition, this change re-arranges the HTML tags produced in the
generated RST file such that they line up nicely and can better be
checked by humans for completeness.

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
7 years ago
Toshio Kuratomi af2073d057 metadata 1.1
* Add network value to support_by field.
* New support_by value, certified
* Deprecate curated in favor of certified
* Add conversion from 1.0 to 1.1 to metadata-tool
* Add supported by Red Hat field to ansible-doc output
7 years ago
John R Barker f338dd2fc3 Render returned dictionaries Fixes #24775 (#24777)
plugin.rst.j2 was out of sync with syntax validator
7 years ago
John R Barker ecbf8e933a Docs how to test (2nd) (#24094)
* Big testing doc refactor
* Combine all the testing documentation in to one place to make it easier to find
* Convert everything to RST
* Create testing_network guide
* Create testing landing page
* For each section detail "how to run" and "how to extend testing"
* More examples
* Lots more detail
7 years ago
Brian Coca 424e1946f4 moved docs generation and templates to docs/ 7 years ago