11 Compile Content Layouts as HTML

In some cases, you may want to use an asset as its HTML rendition in associated content layout in web applications or other discrete ways, without precompiling an entire site. To publish a layout as HTML:

  • Enable Publish HTML when creating a content or asset type in the Oracle Content Management web interface. For information on how to create a content or asset type, see Create a Content Type in Managing Assets with Oracle Content Management.

  • Select a component layout that can compile the layout as HTML, meaning it must have a compile.js script in the assets directory. For information on content layout compilers, including sample code of a content layout compiler, see Content Layout Compilers in Building Sites with Oracle Content Management.

  • Publish the asset to trigger compilation of the layout. When an asset of that type is created and published, the HTML renditions are generated and made available in the REST API at:
    <Instance_URL>/content/published/api/v1.1/items/<item_guid>/renditions?channelToken=<token>
  • You can access the HTML rendition log. The log is generated after assets that are configured to generate HTML renditions are submitted for publishing. The rendition log can be downloaded from Assets in the Oracle Content Management web interface, then go to Publishing Events Logs. Logs are JSON files that contain either detailed information on the generated renditions and the layout used for the renditions, or error messages that can help you troubleshoot issues if compilation failed for some reason.

Note:

You can compile content layouts only if your Oracle Content Management instance is running natively on Gen 2 Oracle Cloud Infrastructure (OCI).