Welcome Geek Space 9

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:

Here is how I did it (Getting Started).

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 nodejs

node --version

Then install roots

npm install roots -g
roots --version

To make this work, I had to add a line to my ~/.nmprc:

prefix=/path/to/writable/directory

I also added

PATH=/path/to/writable/directory/bin
NPM_MODULES=/path/to/writable/directory

to my ~/.bashrc

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 git@github.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 :marked.

Setup on the Netlify side.

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:

site config

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.

what is wrong with this picture?

And the main dashboard is also blank.

Wait. I know there is a site here.

I am not complaining.

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):