Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrloop/strava_onebox
Strava Onebox for embeding strava rides
https://github.com/mrloop/strava_onebox
Last synced: 5 days ago
JSON representation
Strava Onebox for embeding strava rides
- Host: GitHub
- URL: https://github.com/mrloop/strava_onebox
- Owner: mrloop
- Created: 2014-09-08T15:51:17.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2021-11-07T21:13:30.000Z (about 3 years ago)
- Last Synced: 2023-03-11T18:34:28.863Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Strava Onebox
[![CI](https://github.com/mrloop/strava_onebox/actions/workflows/ci.yml/badge.svg)](https://github.com/mrloop/strava_onebox/actions/workflows/ci.yml)
[Strava](https://www.strava.com/) [Onebox](https://github.com/discourse/onebox) for embedding strava activities in [Discourse](discourse.org)
Example at http://elgin.cc/t/australian-pursuit-race/66/2
### Supported URLs for embeds
You need to use a url from the 'Embed on Blog' code
- http://www.strava.com/activities/190948728/embed/7dc1376fba9ec275bf3b41a2df3d423ed2f5c6ae
Or 'Share your rides' from your profile
- https://www.strava.com/athletes/150922/latest-rides/9debf6ca6f225aa2f987ca2f99b416d78f6b0f49
- https://www.strava.com/athletes/150922/activity-summary/9debf6ca6f225aa2f987ca2f99b416d78f6b0f49### Allowed iframes
Update the 'allowed iframes' in the security settings of your site to include 'https://www.strava.com/'.
## Installation
```sh
cd /var/discourse
nano containers/app.yml
``````yml
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- mkdir -p plugins
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/mrloop/strava_onebox.git```
* Rebuild the container and restart the application
```sh
cd /var/discourse
./launcher rebuild app
./launcher restart app```
### Update existing posts
```sh
./launcher enter app
cd /var/www/discourse
rake posts:refresh_oneboxes```
## To run tests
```sh
ruby -Ilib:test plugin_test.rb
```