Merge branch 'arguments' into 'master'
add headerbar and logo options as command line arguments See merge request colibris/framemo!2
This commit is contained in:
commit
5183db5829
2 changed files with 15 additions and 8 deletions
|
@ -69,8 +69,7 @@ Some customisation options
|
||||||
Header Bar
|
Header Bar
|
||||||
==========
|
==========
|
||||||
|
|
||||||
In `config.js` set `headerBarUrl` to a json url containing :
|
Set the argument `--headerBarUrl` with an URL pointing to a JSON with the following structure :
|
||||||
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
|
@ -82,7 +81,7 @@ In `config.js` set `headerBarUrl` to a json url containing :
|
||||||
Logo
|
Logo
|
||||||
====
|
====
|
||||||
|
|
||||||
In `config.js` set `logoUrl` to an image url
|
Set the argument `--logoUrl` with an URL pointing to your logo.
|
||||||
|
|
||||||
license
|
license
|
||||||
-------
|
-------
|
||||||
|
|
18
config.js
18
config.js
|
@ -7,7 +7,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var argv = require("yargs").usage(
|
var argv = require("yargs").usage(
|
||||||
'Usage: $0 [--port INTEGER [8080]] [--baseurl STRING ["/"]] [--redis STRING:INT [127.0.0.1:6379]] [--gaEnabled] [--gaAccount STRING [UA-2069672-4]]'
|
'Usage: $0 [--port INTEGER [8080]] \
|
||||||
|
[--baseurl STRING ["/"]] \
|
||||||
|
[--redis STRING:INT [127.0.0.1:6379]] \
|
||||||
|
[--gaEnabled] \
|
||||||
|
[--gaAccount STRING [UA-2069672-4]] \
|
||||||
|
[--headerBarUrl STRING] \
|
||||||
|
[--logoUrl STRING] \
|
||||||
|
[--faviconUrl STRING] \ '
|
||||||
|
|
||||||
|
|
||||||
).argv
|
).argv
|
||||||
|
|
||||||
exports.server = {
|
exports.server = {
|
||||||
|
@ -29,7 +38,6 @@ exports.database = {
|
||||||
port: redis_conf.split(":")[1] || 6379,
|
port: redis_conf.split(":")[1] || 6379,
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.headerBarUrl =
|
exports.headerBarUrl = argv['headerBarUrl'] || null /* example url with appropriate json markup : 'https://colibris-lemouvement.org/archipel-markup?domain=colibris-outilslibres.org' */
|
||||||
null /* example url with appropriate json markup : 'https://colibris-lemouvement.org/archipel-markup?domain=colibris-outilslibres.org' */
|
exports.logoUrl = argv['logoUrl'] || null /* example logo url : 'https://postit.colibris-outilslibres.org/images/logo-Post-it.svg' */
|
||||||
exports.logoUrl = null /* example logo url : 'https://postit.colibris-outilslibres.org/images/logo-Post-it.svg' */
|
exports.faviconUrl = argv['faviconUrl'] || null /* example favicon url : 'https://postit.colibris-outilslibres.org/images/favicon.png' */
|
||||||
exports.faviconUrl = null /* example favicon url : 'https://postit.colibris-outilslibres.org/images/favicon.png' */
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue