sphinx-material icon indicating copy to clipboard operation
sphinx-material copied to clipboard

html_minify doesn't work with the 'dirhtml' builder

Open duncanmmacleod opened this issue 3 years ago • 1 comments

The html_minify option uses a custom site_pages list to know what documents to minify, which is built as follows:

https://github.com/bashtage/sphinx-material/blob/3c3d1533a8ef09dad6987e06fc5375867c18c529/sphinx_material/init.py#L60-L61

which doesn't work when using the dirhtml builder, for which the page URL is something like

os.path.join(app.outdir, pagename + "/index.html")

...I think. If it's as easy as checking the builder in an if statement, I might be able to put together a patch.

duncanmmacleod avatar Jul 22 '21 16:07 duncanmmacleod

A PR is welcome. Thanks.

bashtage avatar Jul 23 '21 06:07 bashtage