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

Only "load" a theme when it is explicitly requested by the user. #1105

Merged
merged 1 commit into from Dec 2, 2016

Conversation

Projects
None yet
1 participant
@waylan
Member

waylan commented Dec 1, 2016

Previously, all installed themes were "loaded" each time the CLI
was run. Now, only the names are obtained unless the user explicitly
requests a theme by name (in user config for via command line option).
A broken third party theme can no longer "break" a project in which
is is not being used.

Fixes #1104.

@waylan waylan force-pushed the waylan:1104 branch from 660b675 to 11e620e Dec 1, 2016

Only "load" a theme when it is explicitly requested by the user.
Previously, all installed themes were "loaded" each time the CLI
was run. Now, only the names are obtained unless the user explicitly
requests a theme by name (in user config for via command line option).
A broken third party theme can no longer "break" a project in which
is is not being used.

Fixes #1104.

@waylan waylan force-pushed the waylan:1104 branch from 11e620e to 48d297a Dec 1, 2016

@waylan

This comment has been minimized.

Member

waylan commented Dec 1, 2016

I think maybe we need to add some better validation (and graceful errors) for the theme requested by the user. I'm going to hold off merging this until I can add that.

@waylan waylan added the Update needed label Dec 1, 2016

@waylan

This comment has been minimized.

Member

waylan commented Dec 2, 2016

I've decided the way to improve validation is via a refactor of themes (which had been discussed elsewhere, although I can't find it right now) where we create a Theme object for each theme. therefore, I'll merge this as-is.

@waylan waylan merged commit cf23bb4 into mkdocs:master Dec 2, 2016

3 checks passed

codecov/project 93.86% (target 90.00%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@waylan waylan removed the Update needed label Dec 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment