Hi,
I’m porting our plugin/theme from 2.1 to 2.2 and am doing some refactoring at the same time. I would like to drop the CUSTOMIZATION_DIR
setting and just use the signal plugin.get_template_customization_paths
to override existing templates.
But our current theme also contains some other folder, not only /templates
. The Structure looks something like this:
+ scss
- site.scss
- static
- templates
As the asset building process has changed in 2.2, is the scss
subfolder in CUSTOMIZATION_DIR
still supported?
Where are this SCSS files located that are overridden (site.scss)?
Is there a way I could include the scss
folder directly in the plugin (not using the CUSTOMIZATION_DIR
setting)?
What would your general advice be in approaching this kind of customisation with the changes in 2.2? We need to change the header/footer, fonts and colors.
The signal only works for templates, but you can inject your js/css bundles into WPBundleMixin
using self.inject_bundle()
in the plugin. That way you can even use SCSS etc. instead of being limited to just plain CSS.
For the CUSTOMIZATION_DIR
the folder is now named css
and supports only *.css
files (without SCSS), since there is no asset build pipeline available anymore on the server.
1 Like
Can you update the manual ? In https://docs.getindico.io/en/stable/config/settings/#customization it is still named scss folder. Are there any other limits for customization with the new version 2.2? We use css, static and template customization
1 Like
OK we missed updating that part of the docs We’ll fix that…
1 Like
Hey the path for the own logo is not working anymore. For the old configuration 2.1.8 was working:
LOGO_URL = ‘/static/custom/dkfz_logo_hauptseite.png’
real path: /opt/indico/dkfzdesign/static/dkfz_logo_hauptseite.png
How must the LOGO_URL look like for 2.2 ?
I actually mentioned this in the updated docs linked above
First rename the folder:
mv /opt/indico/dkfzdesign/static /opt/indico/dkfzdesign/files
Then in the config, use the new URL:
LOGO_URL = '/static/custom/files/dkfz_logo_hauptseite.png'
1 Like
sry but thanks a lot for the fast response
Thanks for the tips!
inject_bundle()
doesn’t work for us, because we have also a custom login page and inject_bundle()
is not available on the login page. I think I will generate locally the css from scss and just use it.