Low commit activity in last 3 years
A long-lived project that still receives updates
Embedding hatenastar into the your middleman website.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

middleman-hatenastar

test codecov

middleman-hatenastar is a hatenastar extension for Middleman.

Usage

1. bundle install

# Gemfile
source 'https://rubygems.org'

gem 'middleman', '>= 4.0.0'
gem 'middleman-hatenastar'

and run bundle install

2. get your hatenastar token

See also → はてなスターをブログに貼り付ける - はてなスター日記

3. activate hatenastar extension and setting it

# your middleman config.rb
activate :hatenastar,
  token: 'your token',
  uri: 'h3 a',
  title: 'h3',
  container: 'h3',
  entry_node: 'div.section'

4. invoke hatenastar_tag in your layout

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')

5. build middleman site!

$ bundle exec middleman build

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/unasuke/middleman-hatenastar.

License

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

Reference