Why is the async so important?
Tanam is 100% backed by Firebase and all database operations are asynchronous and will
return as Promise
. The template markup allows for arbitrary document lookups and queries
with the helper directives @document and @documents.
Page context
Each template will have a locally scoped document context that contains information about the site and the currently rendered document.
{
"document": {
"id": "2pLAoWMSUZPMj72rST0t",
"documentType": "event",
"data": {
"venue": "Z1DripWIhE4vJFSZNSzX",
"body": "<p>Full HTML supported content</p>",
"startDate": "2019-01-31T04:00:00.000Z",
"endDate": "2019-01-31T06:00:00.000Z",
"image": "LOhmisLtnesWTMRtNZxY",
"registerLink": "bit.ly/AIForBusiness",
"title": "Women Will"
},
"title": "Women Will",
"url": "/event/women-will",
"permalink": "https://kumpul.id/event/women-will",
"revision": 6,
"status": "published",
"tags": [
"event",
"entrepreneurship",
"gbg"
],
"created": "2019-04-01T04:37:40.978Z",
"updated": "2019-04-02T07:43:04.693Z",
"published": "2019-04-03T05:23:41.331Z"
},
"site": {
"domain": "kumpul.id",
"url": "https://kumpul.id",
"theme": "default",
"title": "Kumpul Coworking Space"
}
}
The data
field consist of custom user data, as defined by the content type. While all the other
fields are consistent and present for all documen types.