Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<meta name="viewport" content="width=device-width">
<title>OpenHistoricalMap</title>
<script src="./index.js" type="text/javascript"></script>
<link rel="stylesheet" href="./index.css">
<style type="text/css">
<style>
Copy link
Copy Markdown
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.

body {
margin: 0;
padding: 0;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openhistoricalmap/embed",
"version": "1.0.0",
"version": "1.0.1",
"description": "Embeddable map of OpenHistoricalMap",
"main": "index.js",
"scripts": {
Expand All @@ -19,7 +19,7 @@
"author": "OpenHistoricalMap",
"license": "CC0-1.0",
"bugs": {
"url": "https://github.com/OpenHistoricalMap/openhistoricalmap-embed/issues"
"url": "https://github.com/OpenHistoricalMap/issues/issues"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

},
"homepage": "https://github.com/OpenHistoricalMap/openhistoricalmap-embed#readme",
"devDependencies": {
Expand Down