middleman-hatenastar is a hatenastar extension for Middleman.
# Gemfile
source 'https://rubygems.org'
gem 'middleman', '>= 4.0.0'
gem 'middleman-hatenastar'
and run bundle install
See also → はてなスターをブログに貼り付ける - はてなスター日記
# your middleman config.rb
activate :hatenastar,
token: 'your token',
uri: 'h3 a',
title: 'h3',
container: 'h3',
entry_node: 'div.section'
doctype html
html
head
= hatenastar_tag
You can overwrite setting like this.
doctype html
html
head
= hatenastar_tag(uri: 'h4 a', entry_node: 'div.another-section')
$ bundle exec middleman build
Bug reports and pull requests are welcome on GitHub at https://github.com/unasuke/middleman-hatenastar.
The gem is available as open source under the terms of the MIT License.