XWiki
Description
Use XWiki as a backend for Cristal.
Limitations
Currently, requires XWiki to have a specific extension installed in order for Cristal to access the pages. Refer to the Setup section for more information.
Setup
Cristal <0.20.0
- Install the XWiki Experimental APIs for Cristal Wiki Prototype extension
- Install the Markdown Syntax 1.2 extension
Cristal 0.20.0+
- Install version 1.4.0 of the Cristal Integration - Headless extension
Cristal 1.2.0+
- Install version 1.5.0+ of the Cristal Integration - Headless extension
- Add jetty-ee10-servlets 12.0.12 to webapps/xwiki/WEB-INF/lib
- Edit webapps/xwiki/WEB-INF/web.xml and add the content below next to the Set CORS policy for fonts filter.
<filter> <filter-name>cross-origin</filter-name> <filter-class>org.eclipse.jetty.ee10.servlets.CrossOriginFilter</filter-class> <init-param> <param-name>allowedOriginPatterns</param-name> <param-value>*</param-value> </init-param> <init-param> <param-name>allowedMethods</param-name> <param-value>GET,POST,OPTIONS,DELETE,PUT,HEAD</param-value> </init-param> <init-param> <param-name>allowedHeaders</param-name> <param-value>origin, content-type, accept, authorization</param-value> </init-param> </filter> <filter-mapping> <filter-name>cross-origin</filter-name> <url-pattern>/rest/*</url-pattern> <url-pattern>/bin/*</url-pattern> </filter-mapping>
XWiki <16.7.0 You need to add jetty-servlets 10.0.20 instead of jetty-ee10-servlets, and use org.eclipse.jetty.servlets.CrossOriginFilter as the filter class.
Cristal 1.9.1+
Older XWiki versions
By default, Cristal needs XWiki 18.2.0 or later. On an older XWiki, Cristal never offers to edit a page, and it displays pages that are not in Markdown as raw source.
To use Cristal with an XWiki older than 18.2.0:
- Install version 1.4.0 of the Cristal Integration - Headless extension, or version 1.3.0 on an XWiki older than 18.1.0. Version 1.5.0 and later no longer provide the endpoint Cristal needs.
- Build Cristal from its sources with the VITE_CRISTAL_XWIKI_LEGACY_REST environment variable set to true:
VITE_CRISTAL_XWIKI_LEGACY_REST=true pnpm build
When XWiki does not return the edit right or the rendered content of a page, Cristal then reads them from the /rest/cristal/wikis/xwiki/spaces/.../pages/...?format=jsonld endpoint of the extension.
OpenID Connect
For the authentication to work, XWiki needs to have the OIDC Provider extension installed.
Then, the authentication service must be set to Token based authenticator in the administration.

This project is being financed by the French State as part of the France 2030 program
Ce projet est financé par l’État Français dans le cadre de France 2030