This repository contains the source code for my personal website, including a blog section that automatically synchronizes with my Medium articles.
New Medium articles are automatically fetched and displayed on the website through a GitHub Actions workflow:
- The workflow runs daily at midnight UTC
- It fetches the latest posts from your Medium profile (
@stockerjulien) - Downloads the original featured images
- Categorizes articles based on content
- Updates the blog section in the website
No manual intervention is required - just publish articles on Medium and they will appear on your website within 24 hours.
If you need to update the blog section immediately after publishing a new Medium article:
- Clone this repository to your local machine
- Ensure you have Python 3 installed
- Set up a virtual environment (if it doesn't exist):
python3 -m venv venv - Activate the virtual environment:
- On macOS/Linux:
source venv/bin/activate - On Windows:
venv\Scripts\activate
- On macOS/Linux:
- Install required packages:
pip install feedparser requests beautifulsoup4 - Run the update scripts:
python3 update-medium.py python3 update-blog-section.py - Commit and push the changes:
git add . git commit -m "Update blog with latest Medium articles" git push
-
update-medium.py:
- Fetches your latest Medium posts via RSS feed
- Extracts post information (title, link, date, image)
- Saves the data to
medium_posts.mdandmedium_posts.json
-
update-blog-section.py:
- Loads the Medium posts data
- Downloads the original images from Medium
- Categorizes posts (Finance, Robotics, Environmental Monitoring)
- Updates the blog section in index.html
To modify how posts are categorized, edit the determine_category function in update-blog-section.py.
What I did locally (and what you should do on every update) python3 update-medium.py – refreshed medium_posts.(json|md) and now contains the new post. python3 update-blog-section.py – downloaded the image from Medium and stored it as assets/images/blog/medium_starting_with_lerobot_imitation_learning.png regenerated the whole blog section inside index.html. Verified the file exists: Apply to README.md file Confirmed index.html now uses that path: Apply to README.md
After GitHub Pages finishes rebuilding (usually ~30 s) reload the site; the “Starting With LeRobot Imitation Learning” card will display correctly. How to avoid this next time • Never add images or edit index.html by hand. • Just run Apply to index.html Run push or let the scheduled GitHub Action do it for you – it already runs every night.
