Configuration Files

Overview

This page will use the term "client configuration" often, this term refers to the configuration used by the Writer to figure out which plugins to load and in what order, what language to use for labels, and many other settings not covered here.
Naviga Writer has one or many client configuration files which are served to users when opening the Writer. There is also a server configuration file where devops can change a few select server settings per customer.
The configuration files are written in JSON, which is a fairly popular text-based data format. This means that the configuration files are portable and easily updated for administrators with access to them.

Client Configuration Files

When a user creates a new article or opens an existing one, one of the first things that happen is the Writer will load its client configuration to figure out which plugins to load. The client configuration received depends on the user's selected NavigaID unit and which version of the Writer is being used.

Client Configuration Example

org-name/7.0/client.json
1
{
2
"language": "en_US",
3
"labelLanguage": "en",
4
"facebookAppId": "0000133700000042",
5
"contentHost": {
6
"protocol": "https://",
7
"credentials": "include",
8
"hostName": "editorial-oc.test.infomaker.io",
9
"port": "5000",
10
"healthPath": "/opencontent/health",
11
"queryPath": "/opencontent/search",
12
"objectPath": "/opencontent/objects"
13
},
14
"plugins": [
15
{
16
"id": "io.infomaker.myplugin",
17
"name": "im-myplugin",
18
"url": "https://plugins.writer.infomaker.io/v1/infomaker/im-myplugin/1.0.0/index.js",
19
"style": "https://plugins.writer.infomaker.io/v1/infomaker/im-myplugin/1.0.0/style.css",
20
"enabled": true,
21
"data": {
22
"apiKey": "abcd1234"
23
}
24
}
25
]
26
}
Copied!
This is a very small example of a client configuration file containing the bare minimum of properties used to make a Writer be able to start.
This page will not deep dive and explain each property and its use, it will only focus on the "plugins" list, and how to separate client configuration depending on selected NavigaID unit.

Plugin Configuration per Unit

Normally a plugin block will be used by the entire Organisation, but sometimes specific Units in that organisation needs to have different configuration in a plugin's "data"-property, or a few plugins should be disabled/enabled for only one Unit.

Plugin Configuration with Units Example

1
{
2
"plugins": [
3
{
4
"id": "io.infomaker.test",
5
"name": "im-test",
6
"url": "https://plugin.writer.io/index.js",
7
"style": "https://plugin.writer.io/style.css",
8
"enabled": true,
9
"data": {
10
"apiKey": "global-api-key"
11
}
12
},
13
{
14
"id": "io.infomaker.test",
15
"name": "im-test",
16
"url": "https://plugin.writer.io/index.js",
17
"style": "https://plugin.writer.io/style.css",
18
"units": ["imnews"],
19
"enabled": true,
20
"data": {
21
"apiKey": "api-key-just-for-imnews"
22
}
23
},
24
{
25
"id": "io.infomaker.test",
26
"name": "im-test",
27
"url": "https://plugin.writer.io/index.js",
28
"style": "https://plugin.writer.io/style.css",
29
"units": ["naviganews"],
30
"enabled": false
31
}
32
]
33
}
Copied!
In this example we have added "units"-property to the plugin configuration block.
Property
Description
"units"
A list of units that should use the configuration block.
In the example above, we can see three plugins configured with the same value for their "id"-property, "io.infomaker.test". Normally this will not work since "id" should be unique, but because we also include a "units"-property, when the user receives the client configuration for its unit, the "id" will be unique, since the other plugin blocks will be filtered out.
  • The first plugin config block does not have a "units"-property, so this is used by the entire organisation
  • The second plugin config block has "units"-property set to ["imnews"], indicating that this block should be used by imnews unit. It also has different values in its "data"-property from the organisation config
  • The third plugin config block has "units"-property set to ["naviganews"], and also its "enabled"-property set to false. This indicates that the configuration block should be used by naviganews unit and that the plugin should not be loaded by the Writer.
If you made it this far, congratulations.

Client Configuration per Unit

When plugin configuration is not enough, and properties other than "plugins" need to be changed for a specific unit, such as setting different label language or if different generic properties should used, then it's possible to override an entire client configuration file for that unit.
Client configuration should really only be overridden if the Organisation-wide client.json becomes unmanageable because of unit-specific plugins-configuration, or the unit requires very specific settings
To override a client configuration file for a unit, simply create a new JSON file called unitx-client.json (where unitx is the name of the unit) and place it next to the regular client.json file.
For instance, creating a file called imnews-client.json will cause any user with the selected unit imnews to receive the contents of that file instead of the normal client.json.