Hook the dashboard to a public F1 data API. Standings update on their own once a race is over — no touching the file again for the rest of the season.
show the setup
Easiest path · Jolpica F1 (Ergast successor, CORS-enabled). Add this script tag near the bottom of the file, just before the closing </body>. It fetches once on load and overwrites the hardcoded driver points in place:
<script>
(async function () {
try {
const r = await fetch('https://api.jolpi.ca/ergast/f1/current/driverStandings.json');
const j = await r.json();
const list = j.MRData.StandingsTable.StandingsLists[0]?.DriverStandings || [];
document.querySelectorAll('.driver-row').forEach((row, i) => {
const d = list[i];
if (!d) return;
const pts = row.querySelector('.driver-pts');
if (pts) pts.textContent = d.points;
});
} catch (e) { /* network blip — keep the static template */ }
})();
</script>
More powerful · OpenF1 + a tiny proxy. OpenF1 has live timing data (laps, pit stops, positions during a session) but doesn't expose CORS. A 30-line Cloudflare Worker fixes that and adds a 10-minute cache. The Worker quickstart link below has everything; the transformation logic mirrors the snippet above.
Python path · FastF1 + GitHub Actions. Prefer Python? Use the FastF1 library to write a JSON snapshot, commit it via a GitHub Action on a daily cron, and have the dashboard fetch the JSON. Same idea, different stack.