New KOBI documentation is available: https://adeo-ccdp.gitbook.io/kobi/

What’s that ?

The Site application is the first you should look at when creating a new Site.
This application will host the templates required to create Page models in Designer.

Registration

In order to use your Site application in your Site configuration you have to register it.
The registration process is usually made at your application' startup by calling the Registry API

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  "applicationType": "SITE",
  "applicationVersion": "1.0.0",
  "environment": "ref",
  "label": "my site application",
  "name": "my-site",
  "url": "https://my-site-app-url",
  "rewriteContentTypePattern": "(?i)(^(text/|application/json)|.*javascript).*",
  "starterVersion": "2.0.0",
  "passthroughPathPattern":	"",
  "pathPattern": "",
  "staticPathPattern": "^/static/.*",
  "templates": {
  	"rootPath": "/site-templates",
  	"mainResource": "global.ftl",
  	"paths": [
  		{
  			"path":"/",
  			"resources" : [
  				"header.ftl",
				"body.ftl",
				"footer.ftl",
  			]
  		}
  	],
    "css": [
      {
        "browsers":	["modern","legacy" ...],
        "class": "classes to apply on the html element",
        "devices": ["mobile, desktop" ...],
        "hrefAttrName":	"a custom attribute for href (to defer loading)",
        "locales": ["fr-FR" ...],
        "location":	"/static/my-css.css",
        "media": "media",
        "onload": "a onload script",
        "order": number,
        "typeAttr": "customize the value of type attribute"
      }
    ],
    "js": [
      {
        "async": true/false,
        "browsers":	["modern","legacy" ...],
        "class": "classes to apply on the html element",
        "defer": true/false
        "devices": ["mobile, desktop" ...],
        "locales": ["fr-FR" ...],
        "location":	"/static/my-js.js",
        "onload": "a onload script",
        "srcAttrName": "a custom attribute for src (to defer loading)",
        "order": number,
        "typeAttr": "customize the value of type attribute"
      }
    ],
  }
}

A Site application is a specialized Micro application (extends MicroApplication class), a Site application is just a Micro application with templates. Hence you can register components as well although we don’t recommend it, to keep things clear.

Applications may be registered manually through the Designer.
this might be usefull :

  • For test purpose
  • In the case your application is not aware of its URL at startup
  • If your application won’t change much

There are also starter projects to ease the declaration :

Administration

Once registered your application should be available in the Application administration and may be used in a Site configuration