Skip to main content

Create content

A real app would pull content from a content management system (CMS). In order to simplify these instructions, the content is added to a file instead, saving you the time & energy required to set up a CMS.

Add the following file:

/lib/content.json
[
{
"id": "home",
"url": "/",
"fields": {
"title": "Home",
"description": "As you navigate around, content will change."
}
},
{
"id": "development",
"url": "/development",
"type": "topic",
"fields": {
"title": "Development",
"description": "Content about development."
}
},
{
"id": "architecture",
"url": "/architecture",
"type": "topic",
"fields": {
"title": "Architecture",
"description": "Content about architecture."
}
},
{
"id": "authoring",
"url": "/authoring",
"type": "topic",
"fields": {
"title": "Authoring",
"description": "Content about authoring."
}
}
]
About this file

The app will use the data in this file to generate navigation links & to display content in the app:

  • Data in the file with "type": "topic" are used to create navigation links.
  • Other data can be referenced directly from the file (for example, this is how content for personalization can be configured).