question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pointing the netlify preview button to deployed branch url

See original GitHub issue

Describe the bug When I make a change in my CMS and save it, netlify deploys a preview with https://docs.netlify.com/site-deploys/deploy-previews/. This works flawlessly. However when the preview button shows up, it doesn’t link to the preview url, but instead to my default website url.

To Reproduce

  1. Go to a “page” collection, in your cms, that deploys a page.
  2. Make a change in the content.
  3. Click on ‘save’
  4. Click on ‘preview’
  5. Check what the url is (does it match the deployed branch?)

Expected behavior I’d expect to see the preview button link to the new deploy preview url, instead of the base website url.

Is this how it was intended? Or am I missing something in the code? In its current state, the user would have to go to netlify to find the url name.

Applicable Versions: netlify-cms-app 2.15.60 netlify-cms-core 2.54.1 netlify-cms 2.10.180 provider: github

CMS configuration

site_url: https://my-website.org # hiding for privacy
publish_mode: editorial_workflow
backend:
  name: git-gateway
  branch: master
  squash_merges: true

local_backend: true

media_folder: static/img
public_folder: /img

## Aliases code here
## Removed, since not fully relevant

collections:
    - label: 'Pages'
      name: 'pages'
      label_singular: 'Page'
      folder: 'content/pages'
      create: true
      format: 'json'
      show_preview_links: true
      nested:
        depth: 100 # max depth to show in the collection tree
        summary: '{{meta}}' # optional summary for a tree node, defaults to the inferred title field
      editor:
        preview: false
      fields:
        - << : *TITLE
          label: Page title for within cms
        - *SEO
        - *PAGE-COMPONENTS

Thanks in advance!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rishabh1ycommented, Jan 26, 2022

Hi @ottoscholten @erezrokah
As there are no assignees can you assign this issue to me… I would love to work on it

1reaction
SYED-RAFI-NAQVIcommented, Dec 7, 2021

Hello @ottoscholten, @erezrokah,

I would like to on this issue, and I am working on it. May I know where to ask my doubts and what if I am stuck while resolving this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to point the netlify cms preview link to deployed branch
It deploys a preview branch via netlify with (Deploy Previews | Netlify Docs). However when I click on the netlify preview button (in...
Read more >
How to point the netlify preview link to deployed branch
When I make changes to a page and save the changes. It deploys a preview branch via netlify with (https://docs.netlify.com/site-deploys/deploy- ...
Read more >
Deploy Preview Links | Netlify CMS | Open-Source Content ...
The deploy preview URL provided by a backend will lead to the root of the deployed site. Netlify CMS will then use the...
Read more >
Netlify Tutorial – Deploy Previews - YouTube
Learn more at https://www. netlify.com/
Read more >
Netlify Deploy Previews - tempertemper
A Deploy Preview is a fully generated clone of your website, ... to merge to master (assuming your master branch is the one...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found