middleman-strava
is an extension for the Middleman static site generator that exposes helpers which return Strava API results inside your templates.
- bundler
- strava-api-v3 (~> 0.6.0)
- A valid Strava access_token
Add middleman-strava
to your Gemfile
:
gem 'middleman-strava', '~> 1.0.0'
Run bundle install
.
Finally activate the extension within your config.rb
:
activate :strava, :access_token => 'YOUR_PUBLIC_ACCESS_TOKEN'
Reference middleman-strava
helpers from within your templates:
<img src="<%= strava_athlete['profile'] %>" />
<ul>
<% strava_activities('2014-08-01', 7).each do |activity| %>
<li><%= activity['name'] %></li>
<% end %>
</ul>
- Clone repository:
git clone https://github.com/dbeg/middleman-strava.git && cd middleman-strava
- Install gem dependencies:
bundle install
- Run test features:
bundle exec rake test