vale
vale copied to clipboard
How to use vale with Sphinx?
Hi,
I don't know if this is a problem with Vale (v2.6.6), or in the way I use Sphinx, but I don't understand how to configure Vale such, that it works with my setup.
My Sphinx command is:
sphinx-build docs docs/public
In .vale.ini, I set SphinxBuildPath to docs/public.
I see the following error message:
E100 [docs/demo/contents.rst] Runtime error
open /home/user1/docs/public/html/contents.html: no such file or directory
So, it seems like Vale expects the output for Sphinx to be in {SphinxBuildPath}/html.
If I change my Sphinx command to:
sphinx-build docs docs/public/html
using the same .vale.ini file, I get this error:
E100 [docs/demo/auto.rst] Runtime error
open /home/user1/docs/public/html/auto.html: no such file or directory
which indicates that Vale expects all HTML files in the {SphinxBuildPath}/html directory, which doesn't work if you have content inside subfolders.
Could you help me out?
which indicates that Vale expects all HTML files in the
{SphinxBuildPath}/htmldirectory, which doesn't work if you have content inside subfolders.
This looks like a similar issue to https://github.com/errata-ai/vale/pull/279.
In the meantime, though, you can lint your content without defining SphinxBuildPath. The performance isn't as good and there are some edge-case incompatibilities between Sphinx and rst2html, but it should generally work until this issue is resolved.
I'm leaving this issue open as sort of a "catch all" for improving the experience with Sphinx. There are a number of related issues, such as #183 and #340.