hubble.io

0.1.20 • Public • Published

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": "NodeGuides",
  "tagline": "Node.js guides for developers",
  "description": "Node Guides 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": "157331436a37e82e3ef8",
      "secret": "09a42e0a664ab06cfa0c41aeb2c7aa436422eb00"
    }
  },
  "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
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i hubble.io

Weekly Downloads

4

Version

0.1.20

License

none

Last publish

Collaborators

  • pgte