Skip to content

Commit

Permalink
Documentation improvement (#3946)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Dec 15, 2023
1 parent 555dbb2 commit c44b2b0
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .ansible-lint-ignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# See https://ansible-lint.readthedocs.io/configuring/#ignoring-rules-for-entire-files
# See https://ansible.readthedocs.io/projects/lint/configuring/#ignoring-rules-for-entire-files
playbook2.yml package-latest # comment
playbook2.yml foo-bar
1 change: 1 addition & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ autodetected
autodiscovery
autodoc
autofix
autohide
autorefs
autoupdate
awcrosby
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build:
python: "3.11"
commands:
- pip install --user tox
- python3 -m tox -e docs -- --strict --site-dir=_readthedocs/html/
- python3 -m tox -e docs
python:
install:
- method: pip
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ ansible-lint was created by [Will Thames] and is now maintained as part of the
[Ansible] by [Red Hat] project.

[ansible]: https://ansible.com
[contribution guidelines]: https://ansible-lint.readthedocs.io/contributing
[contribution guidelines]: https://ansible.readthedocs.io/projects/lint/contributing
[gplv3]: https://github.com/ansible/ansible-lint/blob/main/COPYING
[mit]:
https://github.com/ansible/ansible-lint/blob/main/docs/licenses/LICENSE.mit.txt
[red hat]: https://redhat.com
[will thames]: https://github.com/willthames
[ansible-lint-action]:
https://ansible-lint.readthedocs.io/installing/#installing-from-source-code
https://ansible.readthedocs.io/projects/lint/installing/#installing-from-source-code
2 changes: 1 addition & 1 deletion docs/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
Due to limitations on how GitHub Actions are processing arguments, we do not
plan to provide extra options. You will have to make use of
[ansible-lint own configuration file](https://ansible-lint.readthedocs.io/configuring/)
[ansible-lint own configuration file](https://ansible.readthedocs.io/projects/lint/configuring/)
for altering its behavior.
To also enable [dependabot][dependabot] automatic updates the newer versions of
Expand Down
30 changes: 23 additions & 7 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
site_name: Ansible Lint Documentation
site_url: https://ansible-lint.readthedocs.io/
site_url: https://ansible.readthedocs.io/projects/lint/
repo_url: https://github.com/ansible/ansible-lint
edit_uri: blob/main/docs/
copyright: Copyright © 2023 Red Hat, Inc.
Expand All @@ -13,13 +13,28 @@ extra_css:
theme:
name: ansible
features:
- content.code.copy
- announce.dismiss
- content.action.edit
- content.action.view
- content.code.annotate
- content.code.copy
- content.tabs.link
- content.tooltips
- header.autohide
- navigation.expand
- navigation.sections
- navigation.instant
- navigation.footer
- navigation.indexes
- navigation.instant
- navigation.path
- navigation.prune
- navigation.sections
- navigation.tabs
- navigation.tabs.sticky
- navigation.top
- navigation.tracking
- search.highlight
- search.share
- search.suggest
- toc.integrate
extra:
social:
Expand All @@ -46,11 +61,12 @@ extra:
name: GitHub

nav:
- User Guide:
- Home:
- home: index.md
- philosophy.md
- installing.md
- Philosophy: philosophy.md
- usage.md
- Setup:
- installing.md
- configuring.md
- profiles.md
- autofix.md
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ keywords = ["ansible", "lint"]

[project.urls]
homepage = "https://github.com/ansible/ansible-lint"
documentation = "https://ansible-lint.readthedocs.io/"
documentation = "https://ansible.readthedocs.io/projects/lint/"
repository = "https://github.com/ansible/ansible-lint"
changelog = "https://github.com/ansible/ansible-lint/releases"

Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def report_outcome(
ignore_file.writelines(sorted(lines))
elif matched_rules and not self.options.quiet:
console_stderr.print(
"Read [link=https://ansible-lint.readthedocs.io/configuring/#ignoring-rules-for-entire-files]documentation[/link] for instructions on how to ignore specific rule violations.",
"Read [link=https://ansible.readthedocs.io/projects/lint/configuring/#ignoring-rules-for-entire-files]documentation[/link] for instructions on how to ignore specific rule violations.",
)

# Do not deprecate the old tags just yet. Why? Because it is not currently feasible
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

DEFAULT_RULESDIR = Path(__file__).parent / "rules"
CUSTOM_RULESDIR_ENVVAR = "ANSIBLE_LINT_CUSTOM_RULESDIR"
RULE_DOC_URL = "https://ansible-lint.readthedocs.io/rules/"
RULE_DOC_URL = "https://ansible.readthedocs.io/projects/lint/rules/"
SKIP_SCHEMA_UPDATE = "ANSIBLE_LINT_SKIP_SCHEMA_UPDATE"

ENV_VARS_HELP = {
Expand Down
2 changes: 1 addition & 1 deletion test/test_internal_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
def test_base_rule_url() -> None:
"""Test that rule URL is set to expected value."""
rule = BaseRule()
assert rule.url == "https://ansible-lint.readthedocs.io/rules/"
assert rule.url == "https://ansible.readthedocs.io/projects/lint/rules/"
2 changes: 1 addition & 1 deletion test/test_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_load_ignore_txt_default_success() -> None:
_ignore_file.write(
dedent(
"""
# See https://ansible-lint.readthedocs.io/configuring/#ignoring-rules-for-entire-files
# See https://ansible.readthedocs.io/projects/lint/configuring/#ignoring-rules-for-entire-files
playbook2.yml package-latest # comment
playbook2.yml foo-bar
""",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ setenv =
skip_install = false
usedevelop = true
commands =
mkdocs build {posargs:}
mkdocs {posargs:build --strict --site-dir=_readthedocs/html/}

[testenv:redirects]
description = Update documentation redirections for readthedocs
Expand Down

0 comments on commit c44b2b0

Please sign in to comment.