Skip to content

Conversation

@erictheise
Copy link
Member

…eprecated "style type". Correct "bugs" url in package.json and bump version number.

…eprecated "style type". Correct "bugs" url in package.json and bump version number.
@erictheise
Copy link
Member Author

I see that the live site responds to index.css with node_modules/maplibre-gl/dist/maplibre-gl.css so feel free to close this. I don't think this is good practice as, from a cursory glance, I'd expect this repository to function locally.

<script src="./index.js" type="text/javascript"></script>
<link rel="stylesheet" href="./index.css">
<style type="text/css">
<style>
Copy link
Member

@1ec5 1ec5 May 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repository does function locally. You need to run npm start rather than opening the checked-in index.html directly in the browser.

esbuild generates https://embed.openhistoricalmap.org/index.css by concatenating any CSS file required by JavaScript (plus any CSS files we manually specify). Currently, all that we require is MapLibre’s stylesheet, so that’s all it contains:

import 'maplibre-gl/dist/maplibre-gl.css';

We could split the inline stylesheet into an index.css (so that it resolves to something locally), then either add it to the esbuild command (so that it gets concatenated with MapLibre’s stylesheet) or require it in index.js.

"license": "CC0-1.0",
"bugs": {
"url": "https://github.com/OpenHistoricalMap/openhistoricalmap-embed/issues"
"url": "https://github.com/OpenHistoricalMap/issues/issues"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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.

3 participants