惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
月光博客
月光博客
The Last Watchdog
The Last Watchdog
T
Tenable Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Simon Willison's Weblog
Simon Willison's Weblog
V
Vulnerabilities – Threatpost
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
A
Arctic Wolf
云风的 BLOG
云风的 BLOG
Know Your Adversary
Know Your Adversary
P
Palo Alto Networks Blog
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
MyScale Blog
MyScale Blog
B
Blog
Spread Privacy
Spread Privacy
S
Schneier on Security
Project Zero
Project Zero
L
LINUX DO - 热门话题
M
MIT News - Artificial intelligence
F
Full Disclosure
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
Cyberwarzone
Cyberwarzone
AWS News Blog
AWS News Blog
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
C
Cybersecurity and Infrastructure Security Agency CISA
Hugging Face - Blog
Hugging Face - Blog
Security Latest
Security Latest
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tailwind CSS Blog
K
Kaspersky official blog
Recent Announcements
Recent Announcements
NISL@THU
NISL@THU
Cisco Talos Blog
Cisco Talos Blog
S
Securelist
P
Privacy & Cybersecurity Law Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Exploit Database - CXSecurity.com
V
Visual Studio Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Webroot Blog
Webroot Blog

Another Dayu - Wordpress

我的 CSS 设置 WordPress 插件 – 旅行地图 WP Travel Map WordPress 友情链接插件 Simple 版 VXNA 和 Folo 一点点展开我的 macOS PIVOT Vol.14 折纸战士 WordPress Newsletter 插件 Bearblog 风格点赞按钮 WordPress 插件-NeoDB Integration 书影音展示页面
减肥前的准备工作 – Strava Running Sync WordPress 插件
2025-08-28 · via Another Dayu - Wordpress

Another Dayu

最近想开始减肥,作为一个博客作者,准备工作当然是做一个 WordPress 跑步骑行插件(捂脸)。

Strava Running Sync 的灵感来源于 Running Page,可自动同步 Strava 跑步数据并在网站上进行可视化展示。

展示页面:https://anotherdayu.com/runningpage/

功能特性

  • 🏃‍♀️ 多运动支持 – 自动同步跑步、步行、骑行等运动数据
  • 📊 统计展示 – 显示总距离、总时长、平均配速等统计信息
  • 🗺️ 地图可视化 – 在交互式地图上展示运动轨迹
  • 📋 数据表格 – 以表格形式展示详细的活动列表,适配电脑和手机端
  • 🎯 类型筛选 – 支持按运动类型筛选数据
  • 🔄 定时同步 – 支持每小时自动同步最新数据

安装与配置

1. 创建Strava应用

  1. 访问 Strava API设置页面
  2. 点击「Create App」创建新应用
  3. 填写应用信息:
  • Application Name: 你的应用名称
  • Category: 选择适当的分类
  • Club: 可留空
  • Website: 你的网站地址(如 https://anotherdayu.com/)
  • Authorization Callback Domain: 你的域名(如:example.com),重要:Authorization Callback Domain 只填写域名,不要包含协议和路径。(如 anotherdayu.com)

回调URL配置说明:如果你的 WordPress 安装在子目录或使用自定义域名,可以在插件设置中修改回调 URL。

最后需要保存 Client ID 和 Client Secret

2. 安装插件

  1. 前往 Github 下载插件:https://github.com/DayuGuo/strava-running-sync
  2. 将插件文件夹上传到 /wp-content/plugins/ 目录;或直接在插件页面上传插件压缩包安装。
  3. 在 WordPress 后台激活插件。

3. 配置插件

  1. 在 WordPress 后台进入「Strava Running」设置页面(侧边栏)
  2. 填入从 Strava 获取的 Client ID 和 Client Secret
  3. 点击「连接到Strava」按钮完成 OAuth 授权
  4. 配置显示选项(地图样式、自动同步等)
  5. 点击「立即同步」进行首次数据同步
  6. 插件基于 Mapbox,需申请账号并获取 Mapbox Access Token。

使用方法

短代码参数

所有短代码都需要在两侧添加 []

使用 strava_running_display 短代码在页面或文章中显示跑步数据。

支持的参数:

  • type – 显示类型
  • both – 同时显示统计、地图和表格(默认)
  • stats – 仅显示统计信息
  • map – 仅显示地图
  • table – 仅显示数据表格
  • limit – 显示的活动数量(默认50)
  • map_height – 地图高度(默认500px)

示例

技术支持

如遇到问题或需要技术支持,请:

  1. 检查 WordPress 和 PHP 版本兼容性
  2. 确认 Strava API 配置正确
  3. 验证回调 URL 配置
  4. 查看 WordPress 错误日志

开源协议

本插件采用 GPL v2 协议开源。


享受跑步,享受数据!🏃‍♀️💨

#Wordpress #建站 #技术笔记