Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A github based documentation solution
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
public
server
tests
tmp
.gitignore
.npmignore
README.md
TODO.md
index.js
logo.png
package.json

README.md


Synopsis

Hubble is a simplified presentation layer on top of github.

Motivation

Socially-centric open source documentation.

Features

  • Uses post recieve hooks to refresh its repos
  • Uses github as the central system of record, so each artcile has
    • Watchers
    • Forks
    • Commit history
    • Contributers
    • Pull requests
  • SEO friendly
  • Easy to customize

Installation

On the root dir of your project:

$ npm install hubble.io

And create a start script:

var HubbleIO = require('hubble.io');
var options = {
  "orgname": "nodedocs",
  "title": "NodeDocs",
  "tagline": "Node.js docs for developers",
  "description": "NodeDocs and FAQ are designed to make you immediately productive with Node.js, to help you understand how all pieces fit together",
  "content": {
    "home": {
      "beginner": "Are you starting your journey with Node? This section of guides is for you!",
      "intermediate": "Already familiar with Node?",
      "expert": "Kickass Node developer? There’s also something interesting for you!"
    }
  },
  "auth": {
    "github": {
      "callback_uri": "http://localhost:8080/auth/github/callback",
      "client_id": "-----github-client-id-here-----",
      "secret": "-----github-client-secret-here-----"
    }
  },
  "db": {
    "url": "http://localhost:5984"
  },
  "email": {
    "sendgrid": {
      "user": "------sendgrid-user-here-----",
      "key": "------sendgrid-key-here-----"
    },
    "to": "------email-here-----",
    "from": "------email-here-----"
  },
  "twitter": "------twiiter-url-here-----",
  "github": "------github-url-here-----",
  "team": [
    {
      "name": "Pedro Teixeira",
      "role": "Programmer",
      "bio": "Author of some Node.js modules, the Node Tuts screencast and some Node books. Co-founder and partner of @thenodefirm, Engineer @ Nodejitsu, Organizer of LXJS",
      "avatar": "//en.gravatar.com/userimage/6494167/902b6be09fcaab52050809f6e6f87066.jpg",
      "twitter": "https://twitter.com/pgte",
      "github": "https://github.com/pgte"
    }
  ]
};

console.log('options:', options);

var server = HubbleIO(options);

server.start(function() {
  console.log('Hubble.IO started');
});

Customize the options and run your startup script.

Access via browser to http://localhost:8080.

Options

Overriding templates

Inside directory server/templates you can find a bunch of templates that are used for rendering all the pages.

You can choose to override these if you want, by supplying your own template base dir when providing the override.templates option like this:

var options = {
  // ...
  override: {
    templates: __dirname + '/templates'
  }
}

Overriding static file serving

Hubble.IO serves static files in the server/public directory.

You can override some of these and serve additional static files by supplying the override.static option like this:

var options = {
  // ...
  override: {
    templates: __dirname + '/public'
  }
}

CouchDB

Hubble.IO uses CouchDB for storing article requests and comments. By default it tries to connect to localhost port 5984, but you can override it by setting the db.url option:

var options = {
  // ...
  db: {
    url: "http://my.couch.server.com:8081"
  }
}

Session Stores

You can use a memory session store or a redis session store.

For changing that you can setup in conf:

var options = {
  // ...
  "session": {
    "store": "redis"
  }
}

You can also specify timeout, hostname, port and password in session.options:

var options = {
  // ...
  "session": {
    "store": "redis",
    "options": {
      "pass": "mypasswordforaccessingredis",
      "host": "hostname.redis.com",
      "port": 9162
    }
  }
}
Something went wrong with that request. Please try again.