Strava Shortcode

Strava Shortcode

ยท 2 min read

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

ParameterTypeRequiredDefaultDescription
Positional arg / idstringYesโ€”Strava activity ID (numeric) or full Strava activity URL. Auto-extracts ID from URL
stylestringNo“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

  1. Open your activity on Strava
  2. Look at the URL: https://www.strava.com/activities/182316148
  3. The number at the end is your activity ID

Copy Full URL

  1. Open your activity on Strava
  2. Copy the URL from the address bar
  3. 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:

  1. Open your activity on Strava
  2. Click the privacy icon
  3. Change visibility to “Public”

Search pages

Loading search index...

No results found. Try a different search term.

โ†‘โ†“ navigate Enter select Esc close