Migrating from Divshot
Divshot has announce they will be shutting down on December 14, 2015. Here’s how to migrate your Divshot project to Surge, and continue to host your project with your custom domain name for free.
Install the Surge CLI
If you had the Divshot CLI installed, you should already have a relatively recent version of Node.js installed. Run the following command in your terminal to install Surge:
npm install --global surge
Publish your project in one command
Now, in the directory of the project you want to publish, just run
surge, passing in the directory you had listed as your Divshot root. If you are building a Jekyll, Middleman, or other statically generated site that has a build directory, use that folder:
You’ll be prompted to sign up for an account, and confirm if the current directory is the one you want to publish.
Finally, you’ll be able to use a randomly generated surge.sh subdomain, or enter your own custom subdomain.
From here, you might want to add your own custom domain for free.
Here are some other features of Surge that can replace somewhat equivilant features on Divshot, making your transition as easy as possible:
Divshot Environments and Environment Domains
If you’d like to automatically manage deployment of different branches or staging situations, we reccomend doing this with Git Hooks and a Continuious Deployment service like Travis CI, CircleCI, or Codeship, all of which can be integrated with Surge.
Divshot enabled clean URLs through a configuration option; these are always enabled on Surge.
If you were using Divshot’s Custom Routes feature to publish an Ember, Angular, or any kind of HTML5 app using pushState routing, you can add a
200.html file to replace this on Surge.
If your project had custom redirects in your
divshot.json file, you can move them to a
ROUTER file on Surge instead. You’ll need to explicitly list the
301 status code for redirects where a status code wasn’t listed.
Surge automatically sets the correct headers depending for your file. Additonally, you can add a
CORS file for Cross-Origin Resource Sharing support on Surge.
SSL and Force HTTPS
If you had a team or organisation on Divshot, you can add them as collaborators through the command line using
Performance and Caching
Like on Divshot, you won’t need to configure anything to enable performance improvements. We automatically serve your project on the Surge CDN, and gzip text-based content. Additionally, we implement our Lucid Caching strategy for every project.
On Divshot, you may have password-protected your project using the Divshot CLI. With Surge, move these credentials into an
AUTH file in the root of the directory you’re publishing. You can even do this using the CLI:
echo username:password > AUTH