Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html_minify doesn't work with the 'dirhtml' builder #114

Open
duncanmmacleod opened this issue Jul 22, 2021 · 1 comment
Open

html_minify doesn't work with the 'dirhtml' builder #114

duncanmmacleod opened this issue Jul 22, 2021 · 1 comment

Comments

@duncanmmacleod
Copy link

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

if minify or prettify:
app.site_pages.append(os.path.join(app.outdir, pagename + ".html"))

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.

@bashtage
Copy link
Owner

A PR is welcome. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants