A gentle introduction to the art of Nodejitsu
Latest commit 28d7522 Oct 1, 2015 @indexzero indexzero Merge pull request #135 from orthographic-pedant/spell_check/acquire
Fixed typographical error, changed aquire to acquire in README.
Failed to load latest commit information.
resources [docs] Add copy and gifcasts for cli docs Apr 21, 2014
.npmignore [minor] allows pdf to be uploaded when deployed Aug 25, 2012
301.json [minor] more redirection clean up May 15, 2013
README.md Fixed typographical error, changed aquire to acquire in README. Sep 30, 2015
package.json [dist] Version bump. 0.8.0 Sep 2, 2015


The Nodejitsu Handbook

You can view the Handbook online at https://www.nodejitsu.com/documentation

Welcome to the Nodejitsu handbook. This document will help familiarize you with deploying your Node.js applications to the cloud while also providing detailed information about Nodejitsu's platform-specific features and about where to get help when you need it.

This is a living document which you can submit patches to at http://github.com/nodejitsu/handbook. Handbook content resides in /content and is easily accessed by using several methods of /index.js,

Adding content

Writing a new article is done by simply adding a Markdown file to a subdirectory. Several articles with related content can be placed under a seperate/new subdirectory. Only markdown files included in the catalog.

Note: each subdirectory is expected to at least have an index.md to generate a proper catalog.

Moving around content

When you want to move content or complete folders you should update the 301.json file that is in the root of the git repository. This way implementors can redirect urls easily without getting 404's. If you are removing content you don't need to change anything as it's supposed to 404.


Images must be added to /resource. Our CDN will ensure images are fetched from the repository and properly cached. Linking to an image from the article should be done as below:

![no applications](https://versions.nodejitsu.com/id:handbook/resources/noapps.png)

Using the handbook as module

Simply add handbook as dependency to the package.json, make sure to call the handbook constructor, otherwise the search index will not be initialized properly.

var Handbook = require('handbook'),
    documentation = new Handbook();


Get markdown content

Call handbook.get('/a-quickstart/hello-world') with a relative path to the article as first parameter, adding .md is optional.

will return an object with keys content, description, title and tags. For more details about data for all keys, see Description, title and tags.

  content: '##Some markdown content\n\nWhich is not parsed yet.',
  description: 'description parsed from content',
  title: 'title parsed from content',
  tags: [
    'top', 'ten', 'unique', 'descriptive', 'words', 
    'without', 'numbers', 'and', 'short', 'tags'

Get the catalog

Call handbook.catalog() to acquire a complete catalog from content (sychronously), which should return an object with paths, href's, titles and descriptions. If you want to generate the catalog asynchronously then supply a callback to the function.

  index: { 
    index: { 
      href: '',
      title: 'Handbook',
      description: '# Introduction\n\nWelcome to the Nodejitsu handbook. This document will help familiarize you with\ndeploying your Node.js applications to the cloud while also providing detailed\ninformation about Nodejitsu\'s platform-specific features and about\nwhere to get help when you need it.',
      path: '/var/www/nodejitsu/handbook/content' 
  support: { 
    index: { 
      href: '/support',
      title: 'Need Support?',
      description: '# Need Support?\n\nNodejitsu has a team of developers standing by to assist users with any issues\nthey may come across while deploying and administrating their web applications\non the Nodejitsu platform. Nodejitsu strives to have a lightning-fast turnaround\non all issues you may have!',
      path: '/var/www/nodejitsu/handbook/content/support' 

Description, title and tags

Adding a description and title to the article is as easy as providing it at the bottom of the content as per example. Omitting title and/or description is possible. The description will be parsed from the first lines of the content. The title will be returned with an empty string.

[meta:title]: <> (Using the jitsu CLI)
[meta:description]: <> (Some nice description about the content of the article)

Tags are parsed from the content by using Term Frequecy-Inverse Document Frequency. Ten of the most descriptive tags are returned by default. Currently, there is no support for custom tags.

Lunr search

Handbooks search engine is powered by Lunr. The handbook#search method is a simple proxy to Lunr search.