Working with Preview URLs

Jamie Barton
Jamie Barton

December 18, 2020

It's most common to create a preview URL for models that represent a page and have a field such as a slug or other way to identify a unique URL on the web. Of course you aren't limited to only creating web URLs.

Create a Preview URL

  1. Navigate to the schema editor tab.
  2. Find a model you'd like to create a preview URL for.
  3. Expand the three dot menu next to the model name.
  4. Select "Edit Model".
  5. Press a tab next to "settings" called "Preview URLs".
  6. Press the "+ Add" button below, provide a name and a URL string. For example, you can add the {slug} to the URL, https://preview-url.com/posts/{slug}.
  7. Press "Update Model".
  8. Return to that Model's content editing window and open an entry.
  9. A new "Open in ..." button will be in the sidebar.

Delete a Preview URL

  1. Navigate to the edit modal of the content model you want to remove the preview URL from.
  2. Open the "Preview URL" tab.
  3. Press the trash icon next to the Preview URL you want to remove.
  4. Update the model.

It's Easy To Get Started

GraphCMS plans are flexibly suited to accommodate your growth. Get started for free, or reach out to our sales team to discuss larger projects with more complex needs