Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pointing the netlify preview button to deployed branch url #6029

Open
ottoscholten opened this issue Dec 6, 2021 · 3 comments
Open

Pointing the netlify preview button to deployed branch url #6029

ottoscholten opened this issue Dec 6, 2021 · 3 comments

Comments

@ottoscholten
Copy link

@ottoscholten ottoscholten commented Dec 6, 2021

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!

@ottoscholten ottoscholten changed the title Please replace with a clear and descriptive title Pointing the netlify preview link to deployed branch url Dec 6, 2021
@ottoscholten ottoscholten changed the title Pointing the netlify preview link to deployed branch url Pointing the netlify preview button to deployed branch url Dec 6, 2021
@SYED-RAFI-NAQVI
Copy link

@SYED-RAFI-NAQVI SYED-RAFI-NAQVI commented 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?

@erezrokah
Copy link
Collaborator

@erezrokah erezrokah commented Dec 7, 2021

Hi @SYED-RAFI-NAQVI, you can ask any questions in this issue

@imskr
Copy link

@imskr imskr commented Dec 18, 2021

@SYED-RAFI-NAQVI If you are not working on it then I can take it up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants