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

Allow formatting the entire preview url and not just the path #3964

Open
maxerbox opened this issue Jun 30, 2020 · 4 comments
Open

Allow formatting the entire preview url and not just the path #3964

maxerbox opened this issue Jun 30, 2020 · 4 comments
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@maxerbox
Copy link

Is your feature request related to a problem? Please describe.
I need to format the preview link given from the target_url statuse api.
Indeed, my deploy provider is giving it in the wrong format.

Describe the solution you'd like
A simple hook that would allow me to edit the deploy preview url

Describe alternatives you've considered

Additional context
Could be done like #3812

@erezrokah erezrokah added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jun 30, 2020
@erezrokah
Copy link
Contributor

Hi @maxerbox what is the format of the target_url?
Have you tried https://www.netlifycms.org/docs/deploy-preview-links/#configuring-preview-paths?

@maxerbox
Copy link
Author

Hi @maxerbox what is the format of the target_url?
Have you tried https://www.netlifycms.org/docs/deploy-preview-links/#configuring-preview-paths?

My target_url is not pointing on a preview version of the website, but on the building page of my deployment provider.
It has this format: https://xxxx.com/maxerbox/sandrine-neau-website/gxb6qir7j
the last part is an extract of the commit.
I need to transform it to this format : https://sandrine-neau-website-gxb6qir7j.xxxx.app
I think a hook is perfect for this case

@erezrokah erezrokah changed the title Add deploy preview hook to CMS Allow formatting the entire preview url and not just the path Jul 7, 2020
@erezrokah
Copy link
Contributor

Updated the title based on the suggestion from #3966 (comment)

@typeofweb
Copy link

The alternative implemented in #3966 would be more extensible. For example, I need to fetch preview URLs from an API based on the GitHub deployment data – that's no possible with the preview_url_formatter: ['regex', 'replacer'] approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants