Overview
The strava shortcode embeds Strava activity cards directly into your blog posts. Share running routes, cycling tracks, or other athletic activities with embedded maps, statistics, and activity details.
Perfect for fitness bloggers, athletes, and anyone sharing their Strava accomplishments.
Example
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Positional arg / id | string | Yes | โ | Strava activity ID (numeric) or full Strava activity URL. Auto-extracts ID from URL |
style | string | No | “standard” | Embed style (currently “standard” is primary option) |
Basic Usage
With Activity ID
Embed using the numeric activity ID:
{{< strava "182316148" >}}
With Strava URL
Paste the full Strava activity URL (ID is auto-extracted):
{{< strava "https://www.strava.com/activities/182316148" >}}
Named Parameter
Use the id parameter explicitly:
{{< strava id="182316148" >}}
With Style
Specify embed style:
{{< strava id="182316148" style="standard" >}}
Finding Your Activity ID
From the URL
- Open your activity on Strava
- Look at the URL:
https://www.strava.com/activities/182316148 - The number at the end is your activity ID
Copy Full URL
- Open your activity on Strava
- Copy the URL from the address bar
- Paste it in the shortcode (the ID is auto-extracted)
Special Features
Automatic URL Processing
All of these work the same way:
{{< strava "182316148" >}}
{{< strava "https://www.strava.com/activities/182316148" >}}
{{< strava "https://www.strava.com/activities/182316148/" >}}
All extract the numeric ID and produce identical output.
Lazy Script Loading
The Strava embed script is only loaded when needed:
- Strava script loads only once per page
- Improves page performance by preventing unnecessary loading
Privacy Considerations
Public Activities Only
Only public Strava activities can be embedded. Private activities will not render.
To make an activity public:
- Open your activity on Strava
- Click the privacy icon
- Change visibility to “Public”