diff --git a/.readthedocs.yaml b/.readthedocs.yaml
index 747813d8..a05ea658 100644
--- a/.readthedocs.yaml
+++ b/.readthedocs.yaml
@@ -14,6 +14,9 @@ build:
jobs:
pre_build:
- python ./scripts/build_plist.py
+ post_build:
+ - rstcheck -r . # lint rst files
+ # - rstfmt --check --diff -w 120 . # check rst formatting
# Build documentation in the docs/ directory with Sphinx
sphinx:
@@ -28,4 +31,3 @@ python:
install:
- requirements: requirements.txt # plugin requirements
- requirements: requirements-dev.txt # docs requirements
- system_packages: true
diff --git a/.rstcheck.cfg b/.rstcheck.cfg
new file mode 100644
index 00000000..1f97fedd
--- /dev/null
+++ b/.rstcheck.cfg
@@ -0,0 +1,11 @@
+# configuration file for rstcheck, an rst linting tool
+# https://rstcheck.readthedocs.io/en/latest/usage/config
+
+[rstcheck]
+ignore_directives =
+ automodule,
+ include,
+ mdinclude,
+ todo,
+ignore_roles =
+ modname,
diff --git a/README.rst b/README.rst
index 5a2c076f..db36e819 100644
--- a/README.rst
+++ b/README.rst
@@ -2,7 +2,7 @@
Overview
========
-LizardByte has the full documentation hosted on `Read the Docs `_.
+LizardByte has the full documentation hosted on `Read the Docs `__.
About
-----
@@ -13,7 +13,7 @@ This plugin contributes to the following metadata agents.
- Plex Movie - `tv.plex.agents.movie`
- Plex Movie (Legacy) - `com.plexapp.agents.imdb`
- The Movie Database - `com.plexapp.agents.themoviedb`
- - `RetroArcher `_ - `dev.lizardbyte.retroarcher-plex`
+ - `RetroArcher `__ - `dev.lizardbyte.retroarcher-plex`
Integrations
------------
diff --git a/docs/source/about/installation.rst b/docs/source/about/installation.rst
index 29aff326..24ceb628 100644
--- a/docs/source/about/installation.rst
+++ b/docs/source/about/installation.rst
@@ -12,7 +12,7 @@ The bundle is cross platform, meaning Linux, macOS, and Windows are supported.
#. Extract the contents to your Plex Media Server Plugins directory.
.. Tip:: See
- `How do I find the Plug-Ins folder `_
+ `How do I find the Plug-Ins folder `__
for information specific to your Plex server install.
Docker
diff --git a/docs/source/about/troubleshooting.rst b/docs/source/about/troubleshooting.rst
index 770ce2eb..83583ced 100644
--- a/docs/source/about/troubleshooting.rst
+++ b/docs/source/about/troubleshooting.rst
@@ -6,14 +6,14 @@ Troubleshooting
Plugin Logs
-----------
-See `Plugin Log Files `_ for the plugin
+See `Plugin Log Files `__ for the plugin
log directory.
Plex uses rolling logs. There will be six log files available. The newest log file will be named
``dev.lizardbyte.themerr-plex.log``. There will be additional log files with the same name, appended with a `1-5`.
It is best to replicate the issue you are experiencing, then review the latest log file. The information in the log
-file may seem cryptic. If so it would be best to reach out for `support `_.
+file may seem cryptic. If so it would be best to reach out for `support `__.
.. Attention:: Before uploading logs, it would be wise to review the data in the log file. Plex does not filter
the masked settings (e.g. credentials) out of the log file.
@@ -22,5 +22,5 @@ Plex Media Server Logs
----------------------
If you have a more severe problem, you may need to troubleshoot an issue beyond the plugin itself. See
-`Plex Media Server Logs `_
+`Plex Media Server Logs `__
for more information.
diff --git a/docs/source/about/usage.rst b/docs/source/about/usage.rst
index a0d8765b..60d781f5 100644
--- a/docs/source/about/usage.rst
+++ b/docs/source/about/usage.rst
@@ -27,13 +27,13 @@ Web UI
A web interface is provided by the plugin. Currently the web ui only provides a couple of end points.
-/
-^
+/ (root)
+^^^^^^^^
This endpoint will display a report showing the theme song status for each item in a library supported by Themerr-plex.
A supported library is any that has the default agent as one supported by Themerr-plex.
-The report provides an easy means to contribute to `ThemerrDB `_ by providing
+The report provides an easy means to contribute to `ThemerrDB `__ by providing
`Add/Edit` buttons for items that can be added to ThemerrDB.
/status
diff --git a/docs/source/contributing/build.rst b/docs/source/contributing/build.rst
index 20d01130..e14ec16f 100644
--- a/docs/source/contributing/build.rst
+++ b/docs/source/contributing/build.rst
@@ -7,7 +7,7 @@ Python 2.7.
Clone
-----
-Ensure `git `_ is installed and run the following:
+Ensure `git `__ is installed and run the following:
.. code-block:: bash
@@ -38,7 +38,7 @@ Build Plist
npm dependencies
----------------
-Install nodejs and npm. Downloads available `here `_.
+Install nodejs and npm. Downloads available `here `__.
Install npm dependencies.
.. code-block:: bash
diff --git a/docs/source/contributing/contributing.rst b/docs/source/contributing/contributing.rst
index adbe1c0c..d64aca4e 100644
--- a/docs/source/contributing/contributing.rst
+++ b/docs/source/contributing/contributing.rst
@@ -4,4 +4,4 @@ Contributing
============
Read our contribution guide in our organization level
-`docs `_.
+`docs `__.
diff --git a/docs/source/contributing/database.rst b/docs/source/contributing/database.rst
index 21a299f6..94229fc2 100644
--- a/docs/source/contributing/database.rst
+++ b/docs/source/contributing/database.rst
@@ -3,5 +3,5 @@
Database
========
-The database of themes is held in our `ThemerrDB `_ repository. To contribute
+The database of themes is held in our `ThemerrDB `__ repository. To contribute
to the database, follow the documentation there.
diff --git a/docs/source/contributing/testing.rst b/docs/source/contributing/testing.rst
index 0e415d96..66fdd335 100644
--- a/docs/source/contributing/testing.rst
+++ b/docs/source/contributing/testing.rst
@@ -5,7 +5,7 @@ Testing
Flake8
------
-Themerr-plex uses `Flake8 `_ for enforcing consistent code styling. Flake8 is included
+Themerr-plex uses `Flake8 `__ for enforcing consistent code styling. Flake8 is included
in the ``requirements-dev.txt``.
The config file for flake8 is ``.flake8``. This is already included in the root of the repo and should not be modified.
@@ -17,10 +17,10 @@ Test with Flake8
Sphinx
------
-Themerr-plex uses `Sphinx `_ for documentation building. Sphinx is included
+Themerr-plex uses `Sphinx `__ for documentation building. Sphinx is included
in the ``requirements-dev.txt``.
-Themerr-plex follows `numpydoc `_ styling and formatting in
+Themerr-plex follows `numpydoc `__ styling and formatting in
docstrings. This will be tested when building the docs. `numpydoc` is included in the ``requirements-dev.txt``.
The config file for Sphinx is ``docs/source/conf.py``. This is already included in the root of the repo and should not
@@ -41,7 +41,7 @@ Test with Sphinx
pytest
------
-Themerr-plex uses `pytest `_ for unit testing. pytest is included in the
+Themerr-plex uses `pytest `__ for unit testing. pytest is included in the
``requirements-dev.txt``.
No config is required for pytest.
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 405d8888..3820f502 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -4,5 +4,6 @@ m2r2==0.3.2;python_version<"3"
numpydoc==0.9.2;python_version<"3"
git+https://github.com/LizardByte/plexhints.git#egg=plexhints # type hinting library for plex development
pytest==4.6.11;python_version<"3"
+rstcheck==3.5.0;python_version<"3"
Sphinx==1.8.6;python_version<"3"
sphinx-rtd-theme==1.2.0;python_version<"3"