This is a new site. I just built it with Roots and deployed it to Netlify.
About a week ago, I was trying to figure out the best way to deploy this blog. I looked at Roots, where I found a link to Netlify. I signed up, and put it on my backlog (with a relatively low priority). That priority increased when I got an email from Netlify offering money for a blog post and a video tutorial. I thought: "I can do a blog post and a video tutorial, and I like money."
The first offer was a $100 Amazon gift card for 600 words answering the following questions:
Where would you begin? Explain to a new user how to get started with Netlify.
What did you do before Netlify?
Why did you choose Netlify?
When I started this site, I was skeptical. See my reasons at the end.
How has your development process improved?
The continuous deployment is a killer feature. I am rethinking my whole workflow because I like it so much I want to enjoy it everywhere. Root is good because the feedback from editing is very fast. Before this, I was refreshing the browser manually.
What's the most useful feature Netlify offers in your opinion?
Have you heard of JAMstack? What is your definition and how do you implement a JAMStack?
I haven't heard of JAMstack, but I have been working toward it for a few years. Until today, I had just used the term "static website." Maybe that doesn't sound as cool, and maybe it doesn't capture the active nature of these sites, but it is easier for an outsider to understand.
Why do static sites matter? I could (and probably will) write a whole essay about this topic. The most important reason (for me): peer to peer web service is what will save the web from imploding on itself.
Make sure you have nodejs installed. I just used the default that came with
apt-get install nodejs nodejs-legacy. (I am running Ubuntu 16.04 LTS.)
The legacy part just adds a symlink so you can run it as
node as well as
Then install roots
npm install roots -g roots --version
To make this work, I had to add a line to my ~/.nmprc:
I also added
The roots tutorial mentions ship, and
roots deploy -to netlify, but
I had trouble with ship, and the README said it was unmaintained, so I dropped it.
As it happens, Netlify makes deployment so easy that ship isn't necessary.
Now I am going to actually build a site.
roots new site cd site roots watch & atom .
Atom is slower than Sublime Text, and not as mature, but it works.
git init . git ci -m'pristine roots site' git remote add origin email@example.com:lernisto/geekspacenine.com.git git push -u origin master
Right now, you could
roots compile -e production cd public netlify deploy
But that would be too much work. ;-) I wanted to go for what Netlify calls continuous deployment. This requires
installing roots and friends into the
package.json so Netlify's build server can do its magic.
npm install roots --save npm install axis --save npm install rupture --save npm install autoprefixer-stylus --save npm install js-pipeline --save npm install css-pipeline --save npm install coffee-script --save npm install jade --save npm install marked --save npm install stylus --save roots compile
I did a
roots compile between each of those npm installs, until it worked.
Now, the moment of truth:
git ci -am'added missing build dependencies' git push
Now, if you have the Netlify side set up properly, it will just work™.
Oops. I guess it doesn't hurt to do a
roots compile -e production before you push.
I had to
npm install --save transformer-marked and change the
:markdown tag to
I set this up, changed my DNS to point to Netlify's server, turned on HTTPS (which was the major reason I was looking at Netlify over AWS: You a have to use Cloudfront to get HTTPS from an S3 bucket, and Cloudfront is expensive) and got a manually deployed site going fine. I would show you pictures, but it really is not very hard. If you can read instructions, you will be ok. In the end, this is what my app config looked like:
Then I hooked it up to a GitHub repo and pushed. Everything worked. Except for one thing: the site disappeared in the dashboard. The command line still sees it:
$ netlify sites Your Sites geekspacenine: https://geekspacenine.com Opening https://app.netlify.com/sites/geekspacenine Site ID: 299f840c-d38f-480b-af08-4c362ccdb358
But when I go to https://app.netlify.com/ I am getting a blank, even though the site deploys just fine.
And the main dashboard is also blank.
In spite of this glitch, the Netlify folks have done an awesome job. This is way better than using ftp to upload files or even telnet =-( to edit the files in place on the server, like we did in 1994. Having used Netlify for three hours, I never want to go back to rysnc over ssh.
So, in summary, here are the killer features (for me—your mileage may vary):
git push to deploy. And it's fast. (< 15 seconds for this page.)
CDN. This is something I probably don't appreciate yet, because my sites don't get enough traffic for this to matter, but I can appreciate how difficult it would be if I had to set it up myself. (Hint: I wouldn't unless someone paid me a boatload of money.)
Did I mention that it is free? Yes, that is a dangerous word, because it isn't really free. It does cost money to buy those servers, set them up, and keep them running and connected to fat network pipes. So if you can afford it, please do pay for it. There are "cheaper" solutions, but none of them come close to offering what Netlify does.
On the other hand, if you are a penniless high-school student wanting to learn how the web works, by all means jump in. The water is fine.