Archive/Installing VisualEditor before MediaWiki 1.35
< Archive
| tbd @ |
|---|
see this old revision of the extension page
- node.js installieren
- Links: Parsoid/Installing_Node nodejs.org
- Konsoleneingabe:
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -yum -y install nodejsnode --version
- git installieren
- Links: gist.github.com
- Konsoleneingabe:
sudo yum upgradesudo yum install git
- parsoid installieren
- Links: Parsoid/Developer Setup
- In Ordner wechseln, in dem parsoid landen soll
- Konsoleneingabe:
git clone https://gerrit.wikimedia.org/r/p/mediawiki/services/parsoidnpm install
- parsoid konfigurieren
- Konsoleneingabe:
cp -a config.example.yaml config.yamlvi config.yaml- Konfiguration:
uri: 'https://de.wiki-aventurica.de/de/api.php'domain: 'dewa'- Da wir die neueste Parsoid-Version installiert haben, diese aber nicht mit MediaWiki 1.30 funktioniert, noch folgenden Fix in die Konfiguration einfügen (Quelle):
# /!\ COMPATIBILITY for Parsoid 0.9.0 with MediaWiki before 1.31strictAcceptCheck: false
- parsoid starten
- Konsoleneingabe:
node bin/server.js- Test: http://parsoid.wiki-aventurica.de:8000/
- Visual Editor konfigurieren
- localsettings:
wfLoadExtension( 'VisualEditor' );$wgDefaultUserOptions['visualeditor-autodisable'] = true;$wgVisualEditorEnableWikitext = true;$wgVisualEditorUseSingleEditTab = true;$wgDefaultUserOptions['visualeditor-tabs'] = 'multi-tab';$wgVirtualRestConfig['modules']['parsoid'] = array('url' => 'http://parsoid.wiki-aventurica.de:8000','domain' => 'dewa',);
- parsoid autostart
- Links:Parsoid/Developer_Setup
- Konsoleneingabe:
npm install -g pm2pm2 start /var/www/vhosts/wiki-aventurica.de/parsoid/bin/server.jspm2 savepm2 startupreboot- Dies funktionierte nicht sofort. Daher:
pm2 status- Zeigt das Script als "errored" an.
pm2 show 0- liefert mehr Informationen zum Script, darunter den Pfad des error-logs; dieses per vi aufrufen liefert:
- "Error while reading config file: Error: ENOENT: no such file or directory, open '/root/config.yaml'"
- Bequeme Lösung: Symlink erstellen.
ln -s /var/www/vhosts/wiki-aventurica.de/parsoid/config.yaml /root/config.yamlrebootpm2 status- Script wird nun als "online" angezeigt, der VisualEditor funktioniert.