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

Make theme code sharing easier #56

Closed
jacobobryant opened this issue Aug 8, 2022 · 1 comment
Closed

Make theme code sharing easier #56

jacobobryant opened this issue Aug 8, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@jacobobryant
Copy link
Owner

Move themes/default/common.bb to themes/default/src/com/platypub/themes/common.clj. Make render-site and render-email use require instead of load-file. Make a deps.edn file with {:paths ["src" "resources"]} for the contents. Move subscribe.js, email.css and any other files that other themes might want to use to themes/default/resources/com/platypub/themes/default/. Update render-site and render-email accordingly.

Then custom themes can add the default theme as a dependency and reuse anything in common.clj or resources by depending on com.github.jacobobryant/platypub {:sha "..." :deps/root "themes/default"}. (Need to figure out the right way to do that--if custom themes put that in deps.edn, will it apply when we run render-site and render-email? Do we need to change the way Platypub calls theme code? If needed we can always turn render-site and render-email into one-line bash scripts that call bb with the appropriate dependencies and commands)

@jacobobryant jacobobryant added the help wanted Extra attention is needed label Aug 8, 2022
@jacobobryant
Copy link
Owner Author

I've started working on this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant