GitXplorerGitXplorer
f

rb_lunrjs

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
ac67ceca73f4d2391b927104c303438aa34d95ec

Update README.md

cchristianhellsten committed 10 years ago
Unverified
67d2a2b451471bda696142d61941d6e8d2f276bb

Update README.md

cchristianhellsten committed 10 years ago
Unverified
39a2370737cb01df06e650f9b47234f3b361ea28

First version...

aaktagon committed 10 years ago

README

The README file for this repository.

rb_lunrjs

A tool for writing a http://lunrjs.com/ index with Ruby.

Installation

Add this line to your application's Gemfile:

gem 'rb_lunrjs'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rb_lunrjs

Usage

lunr_options = {
  options: [
    {
      name: 'id',
      options: {
        boost: 10
      }
    },
    {
      name: 'name'
    }
  ],
  documents: [
    { id: 1, name: 'Helsinki' },
    { id: 2, name: 'Stockholm' }
  ]
}
options = {
  gzip: false,
  debug: true,
  lunr: lunr_options,
  out_file: 'index.json'
}
# Dump index
RbLunrjs.dump(options)

Contributing

  1. Fork it ( https://github.com/christianhellsten/rb_lunrjs/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Saved a tree')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request