Publishing Content
Content can be published automatically through the Cortex Click GitHub app or by using the SDK/API to write custom publication scripts.
Publishing to GitHub
The Cortex Click GitHub app enables one-click publishing from within the Cortex Click app to publish any piece of generated content in a pull request.
Publishing via the SDK
The SDK can be used to automate publishing.
It is recommended that you take advantage of the content status
field to mark production-ready content as PUBLISHED
.
From there a simple script can be run as a build step within your website:
- Use
client.listContent
to iterate through all pages of content withstatus: "PUBLISHED"
- Retrieve each piece of content
- Write the
content
field to a file in the appropriate location