concepts > documents


Last updated Invalid Date

In a Document, on the upper right of the Dashboard, you'll find the Publish button for a Document that has yet to be published — if the page was previously published, the button will say Unpublish. Published documents are delivered faster because they are cached but when you make changes to them, it may take a second to see the latest changes as the cache has to be updated. Changing your doc and invalidating the cache means that the cache has to be updated, which in turn means it can take a second to see the change. This is because the global cache has to be cleared, such as on servers near the user.

Publishing a Document video

Publishing and validations

Publishing Documents allows you to run validations on a Document so you can keep content-related errors out of your app. You can create validations on Blocks. When Publishing a Document, all Blocks must pass any validations you've set in order for the Document as a whole to pass validation. See Using Blocks for more details on using validations.

Make sure you Publish your Documents for the following reasons:

  • You can use validations on Published Documents, which help prevent errors and deliver the final version of your Document.
  • Published Documents are cached so delivery is faster.

When you've Published a Document, the API tab will show the Document value of published as true, as in the following example:

  "data": {
    "DocPage": {
      "docs": "",
      "navName": "Publishing",
      "path": "/publishing",
      "screenshot": null,
      "_meta": {
        "id": "5a9b7e1445094e0013c0f292",
        "name": "Publishing",
        "updatedAt": 1523660645128,
        "createdAt": 1520139796475,
        "published": true // <-- published is set to true or false

If you haven't published a Document, the value will be false. You can use this as a check in your code.

Go further


Get a quick overview of what Blocks are and how to use them.

Using Blocks

Using Blocks provides a step-by-step guide to using the various kinds of Blocks.