From b79426a6128774317fbe9b462692de57d1de0a86 Mon Sep 17 00:00:00 2001 From: Byounghern Kim Date: Sat, 5 Oct 2024 20:32:59 +0900 Subject: [PATCH] docs: update broken link (#15) --- docs/astro.config.mjs | 2 +- docs/public/hello-world.geojson | 1 + docs/src/examples/HelloWorldExample.tsx | 14 ++++++++++++++ docs/src/layouts/ExampleLayout.astro | 2 +- docs/src/pages/index.astro | 6 +++--- 5 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 docs/public/hello-world.geojson create mode 100644 docs/src/examples/HelloWorldExample.tsx diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index b5142fd..f8169f2 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -4,7 +4,7 @@ import { defineConfig } from "astro/config"; export default defineConfig({ integrations: [react()], site: "https://behoney.github.io", - base: process.env.NODE_ENV === "production" ? "/react-geojson-map" : "/", + base: process.env.NODE_ENV === "production" ? "/react-geojson-map/" : "/", vite: { watch: { include: ["./**"], diff --git a/docs/public/hello-world.geojson b/docs/public/hello-world.geojson new file mode 100644 index 0000000..7cfd616 --- /dev/null +++ b/docs/public/hello-world.geojson @@ -0,0 +1 @@ +{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.35937499999999,66.93006025862448],[-104.4140625,39.90973623453719],[-94.21875,39.36827914916011],[-93.8671875,50.28933925329178],[-85.78125,50.28933925329178],[-85.78125,39.639537564366684],[-75.5859375,39.639537564366684],[-77.6953125,67.06743335108298],[-86.484375,66.79190947341796],[-85.78125,57.7041472343419],[-92.8125,57.32652122521709],[-94.21875,66.51326044311188],[-103.35937499999999,66.93006025862448]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.3671875,67.47492238478702],[-40.42968749999999,67.60922060496382],[-40.78125,64.01449619484472],[-61.52343749999999,63.548552232036414],[-61.52343749999999,57.89149735271031],[-50.625,57.89149735271031],[-50.625,51.39920565355378],[-60.1171875,51.39920565355378],[-61.17187499999999,42.032974332441405],[-42.1875,42.293564192170095],[-42.1875,36.87962060502676],[-68.203125,34.88593094075317],[-71.3671875,67.47492238478702]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-32.6953125,67.60922060496382],[-32.34375,39.36827914916011],[-4.21875,40.713955826286046],[-4.21875,47.754097979680026],[-20.7421875,47.040182144806664],[-21.796875,67.87554134672945],[-32.6953125,67.60922060496382]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[4.5703125,68.78414378041504],[5.9765625,42.553080288955826],[37.265625,43.83452678223682],[37.265625,49.61070993807422],[18.6328125,50.28933925329178],[15.468749999999998,69.03714171275197],[4.5703125,68.78414378041504]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[41.8359375,43.068887774169625],[41.8359375,68.65655498475735],[95.625,68.65655498475735],[95.625,43.068887774169625],[41.8359375,43.068887774169625]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[50.9765625,47.27922900257082],[50.9765625,66.93006025862448],[89.296875,66.93006025862448],[89.296875,47.27922900257082],[50.9765625,47.27922900257082]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-115.6640625,18.312810846425442],[-98.7890625,18.979025953255267],[-84.72656249999999,-15.961329081596634],[-75.5859375,-4.565473550710278],[-69.2578125,-4.214943141390639],[-65.7421875,-15.284185114076433],[-53.0859375,19.973348786110602],[-39.7265625,21.28937435586041],[-65.0390625,-41.244772343082076],[-73.828125,-42.0329743324414],[-76.640625,-28.613459424004414],[-84.375,-41.50857729743933],[-94.921875,-42.0329743324414],[-115.6640625,18.312810846425442]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-34.80468749999999,-39.09596293630548],[-34.80468749999999,21.28937435586041],[14.414062499999998,21.28937435586041],[14.414062499999998,-39.09596293630548],[-34.80468749999999,-39.09596293630548]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-28.125,-31.05293398570514],[-28.125,14.944784875088372],[8.7890625,14.944784875088372],[8.7890625,-31.05293398570514],[-28.125,-31.05293398570514]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[23.203125,21.616579336740603],[22.148437499999996,-38.27268853598096],[32.34375,-37.99616267972812],[33.75,-15.961329081596634],[45.3515625,-36.597889133070204],[59.765625,-36.03133177633187],[39.0234375,-5.266007882805485],[54.84375,-3.513421045640032],[53.0859375,23.241346102386135],[23.203125,21.616579336740603]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[28.828124999999996,2.811371193331128],[28.828124999999996,16.972741019999035],[46.7578125,16.972741019999035],[46.7578125,2.811371193331128],[28.828124999999996,2.811371193331128]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[65.0390625,22.917922936146045],[66.09375,-34.30714385628803],[111.4453125,-34.30714385628803],[110.390625,-25.79989118208832],[78.3984375,-24.206889622398023],[76.9921875,23.56398712845123],[65.0390625,22.917922936146045]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[117.0703125,25.165173368663954],[121.640625,-33.13755119234615],[135.35156249999997,-31.653381399663985],[146.25,-20.3034175184893],[148.7109375,-9.79567758282973],[148.359375,0],[145.1953125,7.36246686553575],[140.2734375,14.604847155053898],[135.703125,20.632784250388028],[128.671875,24.206889622398023],[121.9921875,26.11598592533351],[117.0703125,25.165173368663954]]]}}]} \ No newline at end of file diff --git a/docs/src/examples/HelloWorldExample.tsx b/docs/src/examples/HelloWorldExample.tsx new file mode 100644 index 0000000..0502978 --- /dev/null +++ b/docs/src/examples/HelloWorldExample.tsx @@ -0,0 +1,14 @@ +import React from "react"; +import { GeoDataSource, GeoMap } from "../../../src/lib"; + +const HelloWorldExample: React.FC = () => { + return ( +
+ + + +
+ ); +}; + +export default HelloWorldExample; diff --git a/docs/src/layouts/ExampleLayout.astro b/docs/src/layouts/ExampleLayout.astro index 658dcd0..4bd5a6a 100644 --- a/docs/src/layouts/ExampleLayout.astro +++ b/docs/src/layouts/ExampleLayout.astro @@ -21,7 +21,7 @@ const { title } = Astro.props;