Sha256: a10e93902b6ac1d907d28e249b3137cea54e0892e8b23a3445a1fe98223a1044
Contents?: true
Size: 1.67 KB
Versions: 1
Compression:
Stored size: 1.67 KB
Contents
# Middleman::Robots [![Gem Version](https://badge.fury.io/rb/middleman-robots.svg)](http://badge.fury.io/rb/middleman-robots) [![Build Status](https://travis-ci.org/yterajima/middleman-robots.svg?branch=master)](https://travis-ci.org/yterajima/middleman-robots) `middleman-robots` is an extension of [Middleman](http://middlemanapp.com/). This can create `robots.txt` when build. ## Installation Add this line to your application's Gemfile: ```ruby gem 'middleman-robots' ``` And then execute: $ bundle Or install it yourself as: $ gem install middleman-robots ## Usage Basic usage: ```ruby # config.rb configure :build do activate :robots, :rules => [ {'user-agent' => '*', :allow => %w(/)} ], :sitemap => "http://example.com/sitemap.xml" end ``` You can use options, `rules` {[`user-agent`(string), `allow`(array), `disallow`(array)]} and `sitemap`. Like this: ```ruby # config.rb configure :build do activate :robots, :rules => [ { 'user-agent' => 'Googlebot', :disallow => %w(tmp/* /something/dir/file_disallow.html), :allow => %w(allow/* /something/dir/file_allow.html) }, { 'user-agent' => 'Googlebot-Image', :disallow => %w(tmp/* /something/dir/file_disallow.html), :allow => %w(allow/* /something/dir/file_allow.html) } ], :sitemap => "http://example.com/sitemap.xml" end ``` ## Contributing 1. Fork it ( https://github.com/[my-github-username]/middleman-robots/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
middleman-robots-0.1.0 | README.md |