11Riot
22====
33
4- Riot (formerly known as Vector) is a Matrix web client built using the Matrix
5- React SDK (https://github.com/matrix-org/matrix-react-sdk ).
4+ Riot (formerly known as Vector) is a Matrix web client built using the [ Matrix React SDK] ( https://github.com/matrix-org/matrix-react-sdk ) .
65
76Getting Started
87===============
98
10- The easiest way to test Riot is to just use the hosted copy at
11- https://riot.im/app . The develop branch is continuously deployed by Jenkins at
12- https://riot.im/develop for those who like living dangerously.
9+ The easiest way to test Riot is to just use the hosted copy at https://riot.im/app .
10+ The ` develop ` branch is continuously deployed by Jenkins at https://riot.im/develop
11+ for those who like living dangerously.
1312
1413To host your own copy of Riot, the quickest bet is to use a pre-built
1514released version of Riot:
1615
17161 . Download the latest version from https://github.com/vector-im/riot-web/releases
18171 . Untar the tarball on your web server
19- 1 . Move (or symlink) the riot-x.x.x directory to an appropriate name
18+ 1 . Move (or symlink) the ` riot-x.x.x ` directory to an appropriate name
20191 . If desired, copy ` config.sample.json ` to ` config.json ` and edit it
2120 as desired. See below for details.
22211 . Enter the URL into your browser and log into Riot!
2322
2423Releases are signed by PGP, and can be checked against the public key
25- at https://riot.im/packages/keys/riot.asc
24+ at https://riot.im/packages/keys/riot.asc .
2625
2726Note that Chrome does not allow microphone or webcam access for sites served
2827over http (except localhost), so for working VoIP you will need to serve Riot
@@ -72,13 +71,13 @@ to build.
72711 . If you're using the ` develop ` branch then it is recommended to set up a proper
7372 development environment ("Setting up a dev environment" below) however one can
7473 install the develop versions of the dependencies instead:
75- ```
74+ ``` bash
7675 scripts/fetch-develop.deps.sh
7776 ```
7877 Whenever you git pull on riot-web you will also probably need to force an update
7978 to these dependencies - the simplest way is to re-run the script, but you can also
8079 manually update and rebuild them:
81- ```
80+ ``` bash
8281 cd matrix-js-sdk
8382 git pull
8483 npm install # re-run to pull in any new dependencies
@@ -101,11 +100,10 @@ to build.
101100 a version-specific directory containing all the files that need to go on your
102101 web server.
103102
104- Note that ` npm run dist ` is not supported on Windows, so Windows users can run `npm
105- run build` , which will build all the necessary files into the ` webapp`
106- directory. The version of Riot will not appear in Settings without
107- using the dist script. You can then mount the ` webapp ` directory on your
108- webserver to actually serve up the app, which is entirely static content.
103+ Note that ` npm run dist ` is not supported on Windows, so Windows users can run ` npm run build ` ,
104+ which will build all the necessary files into the ` webapp ` directory. The version of Riot
105+ will not appear in Settings without using the dist script. You can then mount the
106+ ` webapp ` directory on your webserver to actually serve up the app, which is entirely static content.
109107
110108config.json
111109===========
@@ -158,6 +156,13 @@ For a good example, see https://riot.im/develop/config.json
158156 1 . ` whitelistedISUrls ` : a list of IS URLs to not redact from the analytics
159157 1 . ` siteId ` : The Piwik Site ID to use when sending analytics to the Piwik server configured above
1601581 . ` welcomeUserId ` : the user ID of a bot to invite whenever users register that can give them a tour
159+ 1 . ` embeddedPages ` : Configures the pages displayed in portions of Riot that
160+ embed static files, such as:
161+ 1 . ` welcomeUrl ` : Initial content shown on the outside of the app when not
162+ logged in. Defaults to ` welcome.html ` supplied with Riot.
163+ 1 . ` homeUrl ` : Content shown on the inside of the app when a specific room is
164+ not selected. By default, no home page is configured. If one is set, a
165+ button to access it will be shown in the top left menu.
161166
162167
163168Note that ` index.html ` also has an og: image meta tag that is set to an image
@@ -183,23 +188,23 @@ To run as a desktop app:
183188 ` npm run build ` instead of ` npm run dist ` (since we don't need the tarball).
1841892 . Install electron and run it:
185190
186- ```
191+ ``` bash
187192 npm install electron
188193 npm run electron
189194 ```
190195
191196To build packages, use electron-builder. This is configured to output:
192- * dmg + zip for macOS
193- * exe + nupkg for Windows
194- * deb for Linux
197+ * ` dmg ` + ` zip ` for macOS
198+ * ` exe ` + ` nupkg ` for Windows
199+ * ` deb ` for Linux
195200But this can be customised by editing the ` build ` section of package.json
196201as per https://github.com/electron-userland/electron-builder/wiki/Options
197202
198203See https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build
199204for dependencies required for building packages for various platforms.
200205
201206The only platform that can build packages for all three platforms is macOS:
202- ```
207+ ``` bash
203208brew install wine --without-x11
204209brew install mono
205210brew install gnu-tar
@@ -221,21 +226,21 @@ Other options for running as a desktop app:
221226 * https://github.com/krisak/vector-electron-desktop
222227 * @asdf : matrix .org points out that you can use nativefier and it just works(tm)
223228
224- ```
229+ ``` bash
225230sudo npm install nativefier -g
226231nativefier https://riot.im/app/
227232```
228233
229234Development
230235===========
231236
232- Before attempting to develop on Riot you ** must** read the developer guide
233- for ` matrix-react-sdk ` at https://github.com/matrix-org/matrix-react-sdk , which
237+ Before attempting to develop on Riot you ** must** read the [ developer guide
238+ for ` matrix-react-sdk ` ] ( https://github.com/matrix-org/matrix-react-sdk ) , which
234239also defines the design, architecture and style for Riot too.
235240
236- You should also familiarise yourself with the "Here be Dragons" guide to the
237- tame & not-so-tame dragons (gotchas) which exist in the codebase:
238- https://docs.google.com/document/d/12jYzvkidrp1h7liEuLIe6BMdU0NUjndUYI971O06ooM
241+ You should also familiarise yourself with the [ "Here be Dragons" guide
242+ ] ( https://docs.google.com/document/d/12jYzvkidrp1h7liEuLIe6BMdU0NUjndUYI971O06ooM )
243+ to the tame & not-so-tame dragons (gotchas) which exist in the codebase.
239244
240245The idea of Riot is to be a relatively lightweight "skin" of customisations on
241246top of the underlying ` matrix-react-sdk ` . ` matrix-react-sdk ` provides both the
@@ -260,46 +265,57 @@ having to manually rebuild each time.
260265
261266First clone and build ` matrix-js-sdk ` :
262267
263- 1 . ` git clone https://github.com/matrix-org/matrix-js-sdk.git `
264- 1 . ` pushd matrix-js-sdk `
265- 1 . ` git checkout develop `
266- 1 . ` npm install `
267- 1 . ` npm install source-map-loader ` # because webpack is made of fail (https://github.com/webpack/webpack/issues/1472 )
268- 1 . ` popd `
268+ ``` bash
269+ git clone https://github.com/matrix-org/matrix-js-sdk.git
270+ pushd matrix-js-sdk
271+ git checkout develop
272+ npm install
273+ npm install source-map-loader # because webpack is made of fail
274+ # see https://github.com/webpack/webpack/issues/1472
275+ popd
276+ ```
269277
270278Then similarly with ` matrix-react-sdk ` :
271279
272- 1 . ` git clone https://github.com/matrix-org/matrix-react-sdk.git `
273- 1 . ` pushd matrix-react-sdk `
274- 1 . ` git checkout develop `
275- 1 . ` npm link ../matrix-js-sdk `
276- 1 . ` popd `
280+ ``` bash
281+ git clone https://github.com/matrix-org/matrix-react-sdk.git
282+ pushd matrix-react-sdk
283+ git checkout develop
284+ npm link ../matrix-js-sdk
285+ popd
286+ ```
277287
278288Finally, build and start Riot itself:
279289
280- 1 . ` git clone https://github.com/vector-im/riot-web.git `
281- 1 . ` cd riot-web `
282- 1 . ` git checkout develop `
283- 1 . ` npm install `
284- 1 . ` npm link ../matrix-js-sdk `
285- 1 . ` npm link ../matrix-react-sdk `
286- 1 . ` npm start `
287- 1 . Wait a few seconds for the initial build to finish; you should see something like:
288- ```
289- Hash: b0af76309dd56d7275c8
290- Version: webpack 1.12.14
291- Time: 14533ms
292- Asset Size Chunks Chunk Names
293- bundle.js 4.2 MB 0 [emitted] main
294- bundle.css 91.5 kB 0 [emitted] main
295- bundle.js.map 5.29 MB 0 [emitted] main
296- bundle.css.map 116 kB 0 [emitted] main
297- + 1013 hidden modules
298- ```
290+ ``` bash
291+ git clone https://github.com/vector-im/riot-web.git
292+ cd riot-web
293+ git checkout develop
294+ npm install
295+ npm link ../matrix-js-sdk
296+ npm link ../matrix-react-sdk
297+ npm start
298+ ```
299+
300+ Wait a few seconds for the initial build to finish; you should see something like:
301+ ```
302+ Hash: b0af76309dd56d7275c8
303+ Version: webpack 1.12.14
304+ Time: 14533ms
305+ Asset Size Chunks Chunk Names
306+ bundle.js 4.2 MB 0 [emitted] main
307+ bundle.css 91.5 kB 0 [emitted] main
308+ bundle.js.map 5.29 MB 0 [emitted] main
309+ bundle.css.map 116 kB 0 [emitted] main
310+ + 1013 hidden modules
311+ ```
299312 Remember, the command will not terminate since it runs the web server
300313 and rebuilds source files when they change. This development server also
301314 disables caching, so do NOT use it in production.
302- 1. Open http://127.0.0.1:8080/ in your browser to see your newly built Riot.
315+
316+ Open http://127.0.0.1:8080/ in your browser to see your newly built Riot.
317+
318+ ___
303319
304320When you make changes to ` matrix-react-sdk ` or ` matrix-js-sdk ` they should be
305321automatically picked up by webpack and built.
0 commit comments