Admin Guide

Last modified by Manuel Leduc on 2024/12/30 15:33

Configuration format

This section describes the configuration format of the backends. This is usually stored in a config.json file, but we plan to make it possible for users to edit their configuration directly in the user interface.

General structure

The configuration is an object of key and values, for instance:

{
 "XWiki": {},
 "XWikiOffline": {},
 "XWikiSL": {},
 "Nextcloud": {}
}

See below for the detail of each sub-object.

Shared keys

  • configType: the type of the backend. Accepted values: XWiki, Nextcloud, FileSystem, GitHub.
  • serverRendering:
  • offline: when true, each page is cached locally and is refresh in the background if the backend is accessible. This is useful to browse already visited pages when offline.
  • baseURL: the base url to access the backend
  • baseRestURL: a segment concatenated to baseURL to access the backend rest endpoint
  • homePage: the page reference of the main page of the backend
  • designSystem: the identifier of the design system to use. Accepted values: vuetify, and shoelace.
  • realtimeURL: (optional) the URL of a real-time server. When this value is undefined, autosave is activated. When the value is defined, the editor connects to a real-time session on the provided server.

Backends

The sections below presents examples configurations for each supported backend.

XWiki

{
 "XWiki": {
   "name": "XWiki",
   "configType": "XWiki",
   "serverRendering": false,
   "offline": false,
   "baseURL": "http://localhost:8080/xwiki",
   "baseRestURL": "/rest/cristal/page?media=json",
   "homePage": "Main.WebHome",
   "designSystem": "vuetify"
  }
}

Nextcloud

{
   "Nextcloud": {
   "name": "Nextcloud",
   "configType": "Nextcloud",
   "serverRendering": false,
   "offline": false,
   "baseURL": "http://localhost:9292/",
   "baseRestURL": "http://localhost:9292/remote.php/dav/files",
   "designSystem": "shoelace",
   "homePage": "home"
  }
}

Filesystem

{
 "FileSystem": {
   "name": "FileSystem",
   "configType": "FileSystem",
   "serverRendering": false,
   "offline": false,
   "designSystem": "shoelace"
  }
}

Unsupported backends

Github

{
 "GitHub": {
   "name": "GitHub",
   "configType": "GitHub",
   "serverRendering": false,
   "offline": false,
   "baseURL": "https://github.com/cristal-example/test/tree/master/",
   "baseRestURL": "https://raw.githubusercontent.com/cristal-example/test/master/",
   "homePage": "README.md",
   "designSystem": "vuetify"
  }
}

Realtime

Currently, Cristal supports a single real-time server based on hocuspocus.

An example can be found at https://github.com/xwiki-contrib/cristal/tree/main/realtime

France 2030 Logo

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

  • Powered by XWiki 16.4.4-node1. Hosted and managed by XWiki SAS

Get Connected