Showcase Your Work

Showcasing an Interactive Food Truck Locator Blog Using Mapbox and Serverless Functions

Dec 04, 2026
Noah Warren
Noah Warren @noahwarren11
255 Rep Rising Writer
3 views 0 replies
255 Rising Writer 3 Views 0 Replies

I recently built a niche blog that doubles as a real‑time food truck locator. The site is generated with Hugo, but the core novelty is a Mapbox GL JS map that pulls live data from a city open‑data API. To keep the static site fast, I use Netlify Functions to act as a lightweight proxy: they fetch the GeoJSON, filter by cuisine type, and cache the results in Cloudflare Workers KV for 10 minutes. The map is embedded in a dedicated post-food-truck-locator.md using a Hugo shortcode that injects the Mapbox token and the function URL. Key challenges I tackled:

  • Efficiently rendering over 500 truck markers without jank.
  • Ensuring the map is fully responsive on both desktop and mobile.
  • Providing a search UI that filters markers on the client while keeping the data payload minimal.
  • Managing Mapbox access token rotation without breaking cached requests.
I’d love to hear about your approaches to similar problems. Specifically:
  1. What techniques have you used to keep Mapbox maps lightweight when handling large GeoJSON files?
  2. How do you balance serverless function caching with the need for near‑real‑time updates in a map‑centric blog?

Feel free to share code snippets or screenshots of your implementation!


Replies (0)

No replies yet. Be the first to join the discussion.