Skip to content

Manage additional static content

Svyatoslav Reyentenko edited this page Apr 2, 2013 · 3 revisions

You can add additional static content for OpenGenesis installation and provide an access to it from Genesis UI.

Configuration

Add a property genesis.web.content.json to a Genesis properties file. This property should point to a single JSON file describing all additional contents roots.

All additional resources are mapped by Genesis under /content/ path. So, for example, if you'll add a resources additional content folder, and if you'll put a file example.genesis there, you'll get this file with link http://genesis.local:8888/content/resources/example.genesis, assuming Genesis run on host genesis.local and port 8888.

Genesis not impose any restrictions for an additional content, so you can put any kinds of document there.

Example of a content file

[
  {
     "mapping" : "resources",
     "link" : "My resources",
     "index" : "index.html",
     "path" : "/home/genesis/resources"
  },
  {
     "mapping" : "hidden",
     "path" : "/home/genesis/examples"
  }
]

Description of a content file

Field Mandatory Description
mapping Y Mapping of the additional content folder under `/content/` path. In example above you'll get links /content/resources and /content/hidden
path Y Filesystem path to additional resources. Path must exist.
link N Link label in Genesis UI
index N Name of index file of a folder with additional content. If this field is omitted and field link is present default value index.html is used.

When links and index fields are present, Genesis will create an additional menu See also... and it will add all additional links there.

Clone this wiki locally