-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
add requires_theme
to site.collection
#290
Comments
Not sure why I acted like site doesn't have a way to do this already Better Example: Example# site.py
# in the Site class
def collection(self, Collection: type[Collection]) -> Collection:
_Collection = Collection()
###### NEW####
self.register_themes(getattr(_Collection, "required_themes", [])
##############
plugins = [*self.plugins, *getattr(_Collection, "plugins", [])]
... We could also just call them themes. It's a little odd that we would call them just It seems |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some custom collections will have associated themes with them. We need to provide these themes by default.
Perhaps a "required_themes" could be for included themes loaders.
This way the custom collection or page object can include a loader that would be added to the site when the
@site.collection|page
is added.Example
The text was updated successfully, but these errors were encountered: