Skip to content

Add llms.txt with Mapbox/MapLibre split#2593

Open
tordans wants to merge 1 commit into
visgl:masterfrom
tordans:llm-txt
Open

Add llms.txt with Mapbox/MapLibre split#2593
tordans wants to merge 1 commit into
visgl:masterfrom
tordans:llm-txt

Conversation

@tordans
Copy link
Copy Markdown
Contributor

@tordans tordans commented May 30, 2026

Summary

  • Adds docusaurus-plugin-llms to generate LLM-friendly documentation during the website build
  • Splits output by base map library so agents do not load duplicate API reference:
    • llms.txt — lightweight router pointing to stack-specific bundles
    • llms-mapbox.txt / llms-maplibre.txt — link indexes (shared guides + stack API + examples)
    • llms-mapbox-full.txt / llms-maplibre-full.txt — full markdown content per stack
  • Disables monolithic llms-full.txt (~3700 lines of near-duplicate Mapbox/MapLibre API pages)
  • Post-build script appends example links with technique blurbs sourced from examples/{stack}/{name}/README.md

After deploy, files will be available at:

Preview

# react-map-gl

> React components for Mapbox GL JS and MapLibre GL JS

Choose the documentation bundle for your base map library:

- [Mapbox GL JS index](https://visgl.github.io/react-map-gl/llms-mapbox.txt) (full content: [llms-mapbox-full.txt](https://visgl.github.io/react-map-gl/llms-mapbox-full.txt))
- [MapLibre GL JS index](https://visgl.github.io/react-map-gl/llms-maplibre.txt) (full content: [llms-maplibre-full.txt](https://visgl.github.io/react-map-gl/llms-maplibre-full.txt))

Only load one stack's files — API reference pages are parallel but not interchangeable.

## Table of Contents

- [Introduction](https://visgl.github.io/react-map-gl/docs): > These docs are for v8.0. For v7, see [here](https://github.com/visgl/react-map-gl/tree/7.1-release/docs).
- [What's new](https://visgl.github.io/react-map-gl/docs/whats-new.md): Release date: Oct 2025
- [Upgrade Guide](https://visgl.github.io/react-map-gl/docs/upgrade-guide.md): - All imports from `react-map-gl` should be replaced with one of the following endpoints:
- [Contributing](https://visgl.github.io/react-map-gl/docs/contributing.md): **Thanks for taking the time to contribute!**
- [Adding Custom Data](https://visgl.github.io/react-map-gl/docs/get-started/adding-custom-data.md): You can inject data and mapbox native layers using the [Source](../api-reference/mapbox/source.md) and [Layer](../api-reference/mapbox/layer.md) co...
- [Get Started](https://visgl.github.io/react-map-gl/docs/get-started.md): You may find complete project setups in [get-started examples](https://github.com/visgl/react-map-gl/tree/8.0-release/examples/get-started).
- [About Mapbox Tokens](https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens.md): `react-map-gl` itself is open source and free. It provides a React wrapper for `mapbox-gl`, `maplibre-gl` or compatible projects.
- [State Management](https://visgl.github.io/react-map-gl/docs/get-started/state-management.md): There are two ways to use a [Map](../api-reference/maplibre/map.md):
- [Tips and Tricks](https://visgl.github.io/react-map-gl/docs/get-started/tips-and-tricks.md): Because Mapbox tokens are required for the client application to make requests to Mapbox servers, you have to distribute it with your app. It is no...

Preview

# react-map-gl (MapLibre GL JS)

> Docs for react-map-gl with MapLibre GL JS

This file contains links to documentation sections following the llmstxt.org standard.

## Table of Contents

- [Introduction](https://visgl.github.io/react-map-gl/docs): > These docs are for v8.0. For v7, see [here](https://github.com/visgl/react-map-gl/tree/7.1-release/docs).
- [What's new](https://visgl.github.io/react-map-gl/docs/whats-new.md): Release date: Oct 2025
- [Upgrade Guide](https://visgl.github.io/react-map-gl/docs/upgrade-guide.md): - All imports from `react-map-gl` should be replaced with one of the following endpoints:
- [Contributing](https://visgl.github.io/react-map-gl/docs/contributing.md): **Thanks for taking the time to contribute!**
- [Adding Custom Data](https://visgl.github.io/react-map-gl/docs/get-started/adding-custom-data.md): You can inject data and mapbox native layers using the [Source](../api-reference/mapbox/source.md) and [Layer](../api-reference/mapbox/layer.md) co...
- [Get Started](https://visgl.github.io/react-map-gl/docs/get-started.md): You may find complete project setups in [get-started examples](https://github.com/visgl/react-map-gl/tree/8.0-release/examples/get-started).
- [About Mapbox Tokens](https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens.md): `react-map-gl` itself is open source and free. It provides a React wrapper for `mapbox-gl`, `maplibre-gl` or compatible projects.
- [State Management](https://visgl.github.io/react-map-gl/docs/get-started/state-management.md): There are two ways to use a [Map](../api-reference/maplibre/map.md):
- [Tips and Tricks](https://visgl.github.io/react-map-gl/docs/get-started/tips-and-tricks.md): Because Mapbox tokens are required for the client application to make requests to Mapbox servers, you have to distribute it with your app. It is no...
- [AttributionControl](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/attribution-control.md): AttributionControl
- [FullscreenControl](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/fullscreen-control.md): FullscreenControl
- [GeolocateControl](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/geolocate-control.md): GeolocateControl
- [GlobeControl](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/globe-control.md): React component that wraps maplibre-gl's [GlobeControl](https://maplibre.org/maplibre-gl-js/docs/API/classes/GlobeControl/) class.
- [Layer](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/layer.md): Layer
- [LogoControl](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/logo-control.md): LogoControl
- [MapProvider](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/map-provider.md): A [Context.Provider](https://reactjs.org/docs/context.html#contextprovider) that facilitates map operations outside of the component that directly ...
- [default (Map)](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/map.md): default (Map)
- [Marker](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/marker.md): Marker
- [NavigationControl](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/navigation-control.md): NavigationControl
- [Popup](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/popup.md): Popup
- [ScaleControl](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/scale-control.md): ScaleControl
- [Source](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/source.md): Source
- [TerrainControl](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/terrain-control.md): TerrainControl
- [Types](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/types.md): Types
- [useControl](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/use-control.md): The `useControl` hook is used to create React wrappers for custom map controls.
- [useMap](https://visgl.github.io/react-map-gl/docs/api-reference/maplibre/use-map.md): The `useMap` hook allows a custom component to reference the [Map](./map.md) that contains it.

## Examples

- [Clusters](https://visgl.github.io/react-map-gl/examples/maplibre/clusters): visualize points as clusters
- [Markers, Popups and Controls](https://visgl.github.io/react-map-gl/examples/maplibre/controls)
- [Custom Cursor](https://visgl.github.io/react-map-gl/examples/maplibre/custom-cursor): dynamically change the cursor over the map based on interactivity
- [Draggable Marker](https://visgl.github.io/react-map-gl/examples/maplibre/draggable-markers)
- [Draw Polygon](https://visgl.github.io/react-map-gl/examples/maplibre/draw-polygon)
- [Highlight By Filter](https://visgl.github.io/react-map-gl/examples/maplibre/filter): dynamically add/remove filters from layers
- [Geocoder](https://visgl.github.io/react-map-gl/examples/maplibre/geocoder)
- [GeoJSON Animation](https://visgl.github.io/react-map-gl/examples/maplibre/geojson-animation): dynamically add and update custom data sources
- [GeoJSON](https://visgl.github.io/react-map-gl/examples/maplibre/geojson): dynamically add and update custom data sources
- [Heatmap](https://visgl.github.io/react-map-gl/examples/maplibre/heatmap)
- [Limit Map Interaction](https://visgl.github.io/react-map-gl/examples/maplibre/interaction): toggle/limit user interaction
- [Dynamic Styling](https://visgl.github.io/react-map-gl/examples/maplibre/layers): dynamically change layer styles and show/hide layers
- [Side by Side](https://visgl.github.io/react-map-gl/examples/maplibre/side-by-side)
- [Terrain](https://visgl.github.io/react-map-gl/examples/maplibre/terrain)
- [Camera Transition](https://visgl.github.io/react-map-gl/examples/maplibre/viewport-animation): transition smoothly between one viewport to another
- [Zoom to Bounds](https://visgl.github.io/react-map-gl/examples/maplibre/zoom-to-bounds)


Test plan

  • cd website && yarn build succeeds
  • website/build/llms.txt is a router with no Mapbox/MapLibre API pages
  • llms-mapbox.txt contains Mapbox API + 16 examples with blurbs; no api-reference/maplibre links
  • llms-maplibre.txt contains MapLibre API + 16 examples; no api-reference/mapbox links
  • No llms-full.txt generated
  • Verify live URLs after gh-pages deploy on next *-release branch push

Made with Cursor

@tordans tordans force-pushed the llm-txt branch 2 times, most recently from a398492 to 1c01abd Compare May 30, 2026 05:40
Generate stack-specific LLM documentation files so agents load only the
relevant API reference, plus a root router and example links with technique
blurbs from example READMEs.

Co-Authored-By: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant