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

Customize Studio site URL #755

Draft
wants to merge 3 commits into
base: trunk
Choose a base branch
from
Draft

Conversation

sejas
Copy link
Member

@sejas sejas commented Dec 19, 2024

Related issues

Proposed Changes

  • Allow editing Studio site url
  • Use the URL set by the user when starting the site

Testing Instructions

  • TBD

lxFwFr.gif

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@sejas sejas changed the title Add/custom absolute site url Customize Studio site URL Dec 19, 2024
@wojtekn
Copy link
Contributor

wojtekn commented Dec 20, 2024

Nice approach @sejas !

What if we added some affordance to help the user to set up the host? It could be another field below that auto-generates based on the first field value:

Hosts file entry
[127.0.0.1 custom.local] [copy]
To ensure proper functionality, add the above entry to your system's host file. Learn more

I know it's a draft, but I gave it an early test. I changed my site's URL to http://custom.local/ and added 127.0.0.1 custom.local entry to the host file, but I couldn't make it work yet.

@matt-west
Copy link
Contributor

Nice! I’m glad we're adding this. 🙌

I agree with @wojtek that we should add some help content under the field if we’re not able to update the hosts files for users at this stage. Perhaps we could tailor the instructions based on whether the user is running on Windows, Mac, or Linux so they don’t have to exist Studio and read a help doc.

I’d love to add this field to the site creation form too. We should wait until we can automatically update the users hosts file before doing that though. Needing to do that manually will catch a lot of people out, even if we present instructions on how to do it.

@wojtekn
Copy link
Contributor

wojtekn commented Dec 20, 2024

Thanks for chiming in!

Perhaps we could tailor the instructions based on whether the user is running on Windows, Mac, or Linux so they don’t have to exist Studio and read a help doc.

Some users may already know how to do that or use a tool like SwitchHosts. Also, there are multiple ways to do those in both systems, and those can change over time, so I think it would be more manageable to provide a line they should add, a point to docs for detailed instructions which we could update always when needed.

@sejas
Copy link
Member Author

sejas commented Dec 20, 2024

Let’s see where this investigation leads.
Even if the user sets the site URL we won't solve the custom port, so users will need to modify hosts file to point mystudiosite.local, and then access http://mystudiosite.local:8881

My primary goal is to enable the use of tools like ngrok to activate plugins online such as Jetpack, rather than focusing specifically on custom domains. For custom domains it would be great to solve the problem of multiple sites running in the same port.

Thanks for the feedback! I'll add that information in the settings tab 👌.

@sejas
Copy link
Member Author

sejas commented Dec 20, 2024

@matt-west , @wojtekn , here is what we can currently achieve with this PR:

RL4BnA.mov

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

Successfully merging this pull request may close these issues.

3 participants