Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

First Run Process: auto-configure URL

Open ErisDS opened this issue 12 years ago • 3 comments

Probably requires #2164 to be merged first

It would be great if we could try to handle the setting of blog_url in a nicer way than having to edit a config.js file.

Ideally: check if the URL has been set to something other than "my-ghost-blog.com" in config.js

  • if so, do nothing
  • if not write the blog_url in config.js with the base url from wherever example.com/ghost/setup/ is run.

This is pretty complex as we will need to first check to see if Ghost can write to the file. Then we need to read and parse the file, before modifying some part and writing again.

It is probably best to only configure the URL for the current environment, but perhaps doing it for both dev and prod would be easier?

ErisDS avatar Feb 22 '14 17:02 ErisDS

This would help tremendously for things like Windows Azure Websites Gallery.

When you create a site using their gallery option it automatically sets the URL to sitename.azurewebsites.net. If you add a custom domain name after that you have to FTP into the site to change it. If you were able to change the URL on a first time setup page then this gallery option would be so much more useful as you wouldn't have to FTP in just to modify the config.js.

I agree that it should only be configured for the current environment if it is implemented. It would be cool if the first time I cloned the repository and ran the application I was presented with a very brief setup page for the minimal setup information. Then when I later publish to production I'd just go through the same setup again, but using production values this time.

AlexAllocated avatar Feb 23 '14 01:02 AlexAllocated

I agree with both above. I used a one-click installer on WebFaction and while it's easy enough to change the config file I can't figure out what command they ran to compile the site, so the setting isn't taking and "local" links are going to my-ghost-blog.com.

An alternative solution would be to make this a user-configurable setting in the site's administrative panel.

kevinvangelder avatar Jan 04 '15 07:01 kevinvangelder

Closing this in favour of #7414, which will (for alpha-builds does already) solve this.

ErisDS avatar Sep 20 '16 19:09 ErisDS