Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load CSS in the client, not server #16

Open
eyeseast opened this issue Apr 28, 2022 · 1 comment
Open

Load CSS in the client, not server #16

eyeseast opened this issue Apr 28, 2022 · 1 comment

Comments

@eyeseast
Copy link
Owner

This import was probably a bad idea: https://github.com/eyeseast/datasette-geojson-map/blob/main/datasette_geojson_map/__init__.py#L6

That ended up breaking with PR that changed how Leaflet URLs get generated: simonw/datasette-leaflet#9. I could run the plugin hook inside this plugin to generate the right URLs, but that still feels like the wrong way to do it. I could re-run the logic in datasette-leaflet to build the right URL, but I don't want to.

So client-side is probably the best way to ensure the right CSS and JS files are loaded.

@eyeseast
Copy link
Owner Author

It's also possible I should just load leaflet independently, rather than try to coordinate with a plugin. If I end up with two versions of Leaflet on the page, maybe I can life with that.

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

No branches or pull requests

1 participant