The source project of this merge request has been removed.
Support both dirhtml and regular html builders
Do some querying of where Sphinx would place a document and then wrangle the path information based on the detected builder. Also some special handling for pages ending in /index, which sphinx also treats differently.
(Instead of simply querying self.app.builder.name
, and writing out own logic, let sphinx figure out the document path itself.)
Cases:
- Using dirhtml builder, source = 'path/source.html'
-> should return outdir/path/source.html - Using dirhtml builder, source = 'path/source'
-> should return outdir/path/source/index.html - Using dirhtml builder, source = 'path/source/index.html'
-> should return outdir/path/source/index.html - Using regular html builder, source = 'path/source'
-> should return outdir/path/source.html - Using regular html builder, source = 'path/source.html'
-> should return outdir/path/source.html