Wednesday, April 5, 2023

Sites with multiple front ends

I removed Plugin.force_url_prefix because it was unused.

Specifying Site.default_ui is now “the old way”. The attribute default_ui on the Kernel (which was the Plugin instance of the plugin named by Site.default_ui) is no replaced by an attribute web_front_ends.

To use the new feature, you can now set the web_front_ends on the Site, which in that case must be a list of tuples having two items (prefix, modname) each. For example a site with react as default and extjs as alternative front end would have:

web_front_ends = [
  (None, "lino_react.react"),
  ('ext', "lino.modlib.extjs")]

Or in cms1 we have publisher as default and react as the “admin” front end:

web_front_ends = [
  (None, "lino.modlib.publisher"),
  ('admin', "lino_react.react")]