Even though I checked the relative path a million times (it is correct as measured from the document location wherein the reference is stated), still the error is thrown upon pushing the docs to AWS CodeBuild:
Warning, treated as error:
/codebuild/output/src192164467/src/docs/source/proj-repository-contents.rst:100:
unknown document: ../../src/lambda_functions/input/README.rst
The part where I reference the other .rst - document looks like so:
* input
Supports the input ingestion pipelines.
More details can be found in the :doc:`input Lambda functions <../../src/lambda_functions/input/README.rst>` - README.
How can I ensure that another document outside the active parent directory is found via e.g.
:doc:`some name <../../folder/filename.rst>`
?
EDIT: more approaches which did not work
As suggested here, one could include absolute paths into the conf.py
- file like so:
SOURCE_PATH = os.path.join(LOCAL_PATH, '..', '..', 'src')
sys.path.insert(0, os.path.abspath(SOURCE_PATH))
Next, I tried to refer to one of the READMEs with the following approaches, which all failed due to the same 'unknown document error':
<./lambda_functions/input/README.rst>
</lambda_functions/input/README.rst>
<lambda_functions/input/README.rst>
Just for curiosity, I tried with the general root directory of the project, but it also failed:
<src/lambda_functions/input/README.rst>
As a last resort, I tried it with a direct path to the folder where the README-file is located:
LAMBDA_INPUT_PATH = os.path.join(LOCAL_PATH, '..', '..', 'src',
'lambda_functions', 'input')
sys.path.insert(0, os.path.abspath(LAMBDA_INPUT_PATH))
With this, I referred directly to the filename using <README.rst>
, and even this failed.