Repository is archived
No commit activity in last 3 years
No release in over 3 years
Create hatena bookmark on new post created.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 10.0
~> 3.0

Runtime

 Project Readme

Middleman::Blog::Selfbookmark

Create hatena bookmark on new post created.

Installation

Add this line to your application's Gemfile:

gem 'middleman-blog-selfbookmark'

And then execute:

$ bundle

Or install it yourself as:

$ gem install middleman-blog-selfbookmark

Usage

Get OAuth token

kkosuge/hatena-bookmark: ε=ε=ε=ε=(/・_・)/

Add configuration to config.rb

require 'middleman/blog/selfbookmark'
activate :blog_selfbookmark do |bookmark|
  bookmark.consumer_key          = ENV['BOOKMARK_CONSUMER_KEY']         # required
  bookmark.consumer_secret       = ENV['BOOKMARK_CONSUMER_SECRET']      # required
  bookmark.request_token         = ENV['BOOKMARK_REQUEST_TOKEN']        # required
  bookmark.request_token_secret  = ENV['BOOKMARK_REQUEST_TOKEN_SECRET'] # required
  bookmark.hostname              = 'http://example.com'                 # required
  bookmark.comment               = ENV['BOOKMARK_COMMENT']              # default: ''
  bookmark.add_tags              = false                                # default: true
  bookmark.new_article_threshold = 3.hour                               # default: 1.hour 
end

License

The gem is available as open source under the terms of the MIT License.