preaction / Statocles

Static website CMS
http://preaction.me/statocles
Other
84 stars 33 forks source link

How do I share a theme with another Statocles install? #577

Closed cxw42 closed 5 years ago

cxw42 commented 5 years ago

Dumb question, but I've been through the POD docs related to themes and templates, and I can't find the answer. Is there any way to send someone else a theme I've made other than a tarball of theme/? I see that the default theme is in share/ in the Statocles directory. Is there support for making a CPAN module that embodies a theme in its share/ files? Perhaps StatoclesX::Theme::... or Statocles::Contrib::Theme::...? Thanks!

preaction commented 5 years ago

There is, in theory, a way to do it. Ostensibly, the ::default syntax was supposed to allow My::Neat::Module and have that distribution's share/ directory be a theme. However, since that part of the theme system is going away in v2 (I'm skipping a version), I wouldn't use it.

For now, yes, tarballing up a theme directory is your best bet (or, if you want to be fancy, git submodule or git subtree). In the future, you will be able to make plugins that add directories to the template paths and layer themes on top of each other that way.

cxw42 commented 5 years ago

OK - thanks for the quick response! Should I leave this issue open for that future enhancement, or close it out?

preaction commented 5 years ago

I think we can close it: My goal is v2 before Advent (for Mojolicious.io), and I won't actually need to do anything to get this feature when v2 releases, it's just how Mojolicious works (so, another way I vastly overcomplicated this whole thing and I should feel bad about it :wink:)