Gitbook : Getting started

Why

I wanted a place to blog (reference resources) but didn't want to reinvent the wheel. It had to be public, easy to host (free / cheap) and would be great to scale with analytics. ;)

My own blog (Problem)!

Most of my favorite tech blogs are simple and mostly look like they were edited by hand. With so much content I would bookmark a few articles (or the whole site) and promise myself I would come back. After a short time, my bookmarks became a mess and I found myself trying to google for that one thing that one guy said a while back. The problem, I got sucked down the rabbit hole of Jekyll, gh-pages and pretty much everything listed on staticgen. I was spending more time configuring then blogging. Once I got a theme published I realized it didn't have this feature or couldn't do that thing.

That's when I realized:

The content is why I kept coming back not the flashy graphics!

As I looked for ways to organize my madness (that didn't require yak shaving ) I started to see a trend:

Gitbook

Even the sites that I bookmarked that were not a Gitbook they were simple and straight forward. Gitbook was searchable, easy to deploy and has plugins for analytics, disqus, etc. So, we have a static blogger that can be hosted anywhere, how do I use it?

npm init

# If running gitbook commands from npm scripts
npm install --save-dev gitbook-cli

# If runing gibook commands on commandline
npm install -g gitbook-cli

Build locally

gitbook install
touch README.md
gitbook build

Serve locally

gitbook serve

Optional: Disqus

book.json
{
    "plugins": ["disqus"],
    "pluginsConfig": {
        "disqus": {
            "shortName": "xxxxxxxx"
        }
    }
}

There we go!

Aditional Resources:

Using Gitbook to document an open source project

results matching ""

    No results matching ""