You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure why I acted like site doesn't have a way to do this already
Better Example:
Example
# site.py# in the Site classdefcollection(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 themes where with plugins we're passing the site's plugins in at rendering time. (At least that's the desired outcome)
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: