From: Karl O. P. <ko...@ka...> - 2023-11-19 23:33:26
|
I guess the full development of my thoughts leads to this observation (which might not be true because I'm not steeped in Sphinx): If "root path" declarations take absolute paths in config.py then a single config.py is not (in the general case) reusable in sphinx-build invocations which use different "sourcedir" paths, because if the sourcedir is different there's likely different image dirs/etc. There seem to be multiple solutions. 1) Allow absolute file system paths, relative to the overall root of the system's filesystem hierarchy, as values for the various "root path" declarations, and have sphinx-build take new arguments, each of which would set a "root path" value similar to the way "sourcedir" works. ("imageroot" "staticroot", etc.) 2) Have the values of the various "root path" declarations be relative to a well-known filesystem path, like the directory containing the config.py file. 3) Do nothing. Different invocations of sphinx-build may need to use different configuration files, each of which would correspond with a different "sourcedir" value. Perhaps there would be a common config file "included" by each top-level config file, the top-level config file being the one that sets the various "root paths". But this would be up to the Sphinx user to construct. 4) Do something else. Magic that completely reworks the expected sphinx directory structure, to not only accommodate multiple sorts of root directories but also to naturally and simply separate sphinx supplied files from user-supplied files. There would then magically be zero level of effort involved in starting to use Sphinx in a way that cleanly works with revision control and with multiple RST source directories (each of which may be expected to produce output formats which differ from each other, given that various output formats sometimes require different image file formats, etc.). Huzzah! Regards, Karl <ko...@ka...> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein |