Origen-SDK / o2

MIT License
4 stars 0 forks source link

Doc includes not working #119

Closed ginty closed 3 years ago

ginty commented 3 years ago

Hi @coreyeng,

When generating either the O2 guides or the web site for an app I get errors like this due to the common shorthand includes not being found:

/home/stephen/Code/github/o2/test_apps/python_app/web/source/index.rst:1: WARNING: Problems with "include" directive path:
InputError: [Errno 2] No such file or directory: 'web/source/home/stephen/Code/github/o2/test_apps/python_app/web/source/interbuild/shorthand/origen.rst'.

For the O2 guides this ultimately leads to a failure to generate because various shorthand references end up undefined.

I've verified that the include directive is being generated correctly:

.. include:: /home/stephen/Code/github/o2/test_apps/python_app/web/source/interbuild/shorthand/origen.rst

I think the problem is that this include directive doesn't accept a true absolute path, rather paths starting with / are interpretted as a reference from the top source directory, not the top of the filesystem. I wonder if it does the right thing on Windows when faced with something like C:/ because it is un-ambiguous in that case.

Anyway, I couldn't find any way to make it respect a true absolute path and was thinking of going down the route of copying the files from Origen core into the local app's source folder at the beginning of generation and thereby enabling a relative path to be used regardless of where Origen is installed.

However, I guess it will be more efficient if you look at a fix since your more aware of what all of the similarly affected resources here could be.

Thanks!