To enable this package in a buildout-based installation:
Edit your buildout.cfg and add the following to it:
After updating the configuration you need to run ‘’bin/buildout’‘, which will take care of updating your system.
Go to the ‘Site Setup’ page in a Plone site and click on the ‘Add-ons’ link.
Check the box next to ‘Rich Link Preview’ and click the ‘Activate’ button.
We use webpack to process static resources on this package.
Webpack processes SCSS and JS files, minifies the resulting CSS and JS, and optimizes all images.
The final JS file is also a UMD package, which provides compatibility with most popular script loaders.
To contribute, you should start the instance in one shell and start webpack watcher on another with the following command:
Then go to webpack/app folder and edit SCSS and JS files;
Webpack watcher will automatically create the final resources in the right place.
There are also other commands added to handle more complex scenarios.
The following command will set the buildout node installation in the system PATH, this way you can use webpack as described on its documentation.
The following command generates JS and CSS without the minify step (it can be used to check the code being generated in a human readable way).
The following command rebuilds static files and exit (insted of keep watching the changes):
Static resources on this package are generated using webpack and aren’t included in VCS.
If you release using zest.releaser you have to upload manually the files to PyPI or you will end with a broken distribution:
- run longtest and fullrelease, as usually
- answer “no” when asked to upload to PyPI and continue normally
- do a checkout to the tag you’re releasing
- run bin/build-richpreview to update static files
- create the distribution files using python setup.py sdist bdist_wheel as usual
- upload the files using twine upload dist/*
In case of errors you will have to create a new release as the PyPI Warehouse doesn’t allow for a filename to be reused.