This is an automated email from the ASF dual-hosted git repository.
bchapuis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps-site.git
The following commit(s) were added to refs/heads/main by this push:
new c0085e4 Improve repository organization (#22)
c0085e4 is described below
commit c0085e4e3838877fce4baaf4319514e702cc7a1a
Author: Leonard <[email protected]>
AuthorDate: Wed May 3 18:22:42 2023 +0200
Improve repository organization (#22)
* Add tsconfig src path
* Move libraries to dist folder
* Add prettier
* Update doc for prettier
* Format code
* Add cicd for prettier
---
.asf.yaml | 20 +-
.github/workflows/publish.yml | 17 +-
.prettierignore | 12 ++
.prettierrc | 11 +
README.md | 6 +
package-lock.json | 16 ++
package.json | 3 +
src/components/features/index.tsx | 16 +-
src/components/features/style.module.css | 236 ++++++++++-----------
src/components/map/index.tsx | 80 +++----
src/components/map/style.module.css | 28 +--
.../maplibre-gl-inspect}/maplibre-gl-inspect.css | 0
.../maplibre-gl-inspect}/maplibre-gl-inspect.js | 0
.../maplibre-gl-tile-boundaries.css | 0
.../maplibre-gl-tile-boundaries.js | 0
src/pages/_app.mdx | 9 +-
src/pages/documentation/developer-manual.mdx | 12 +-
.../documentation/developer-manual/_meta.json | 1 -
.../documentation/developer-manual/basemap.mdx | 14 +-
.../documentation/developer-manual/geocoder.mdx | 2 +-
.../developer-manual/how-to-build-with-maven.mdx | 11 +-
.../developer-manual/ip-to-location.mdx | 41 ++--
.../developer-manual/project-structure.mdx | 2 +-
.../developer-manual/setup-in-intellij.mdx | 2 +-
src/pages/documentation/examples/_meta.json | 17 +-
src/pages/documentation/examples/extrusion.mdx | 1 -
src/pages/documentation/examples/geocoding.mdx | 2 +-
.../examples/import-contour-into-postgis.mdx | 54 ++---
.../examples/import-osm-into-postgis.mdx | 4 +-
.../examples/serve-and-export-vector-tiles.mdx | 4 +-
src/pages/documentation/getting-started.md | 2 +-
src/pages/documentation/getting-started/_meta.json | 4 +-
.../getting-started/installing-the-cli.mdx | 2 +-
src/pages/documentation/index.mdx | 13 +-
src/pages/download/_meta.json | 3 +-
src/pages/index.mdx | 165 +++++++-------
theme.config.tsx | 66 ++++--
tsconfig.json | 6 +-
38 files changed, 488 insertions(+), 394 deletions(-)
diff --git a/.asf.yaml b/.asf.yaml
index ad35616..41afe9a 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -18,18 +18,18 @@ github:
description: Apache Baremaps is a toolkit and a set of infrastructure
components for creating, publishing, and operating online maps.
homepage: https://baremaps.apache.org
labels:
- - java
- - vector-tiles
- - openstreetmap
- - postgresql
- - postgis
- - mapbox
- - spatial-data
+ - java
+ - vector-tiles
+ - openstreetmap
+ - postgresql
+ - postgis
+ - mapbox
+ - spatial-data
- web-mapping
-
+
notifications:
- commits: [email protected]
- issues: [email protected]
+ commits: [email protected]
+ issues: [email protected]
pullrequests: [email protected]
jekyll: ~
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index b6b0a31..ddd297f 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -7,13 +7,26 @@ on:
branches: [main]
jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
+ with:
+ node-version: '18'
+ - name: Install Dependencies
+ run: npm install
+ - name: Check Formatting
+ run: npm run format:check
+
build:
runs-on: ubuntu-latest
+ needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
- node-version: "18"
+ node-version: '18'
- name: Install Dependencies
run: |
npm install
@@ -27,4 +40,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
- publish_branch: asf-site
\ No newline at end of file
+ publish_branch: asf-site
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..6aa9013
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,12 @@
+# Generated files
+node_modules
+.next
+public
+out
+
+# Project files
+src/lib/maplibre/dist
+
+# Lock files
+pnpm-lock.yaml
+package-lock.json
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..b858a21
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,11 @@
+{
+ "tabWidth": 2,
+ "printWidth": 80,
+ "endOfLine": "auto",
+ "arrowParens": "avoid",
+ "trailingComma": "none",
+ "semi": true,
+ "useTabs": false,
+ "singleQuote": true,
+ "bracketSpacing": true
+}
diff --git a/README.md b/README.md
index d92702f..176ef52 100644
--- a/README.md
+++ b/README.md
@@ -7,3 +7,9 @@ This repository contains the sources of the [Apache Baremaps
Website](https://ba
First, run `pnpm i` to install the dependencies.
Then, run `pnpm dev` to start the development server and visit localhost:3000.
+
+### Formatting
+
+This project uses [Prettier](https://prettier.io/) to format the code.
+
+You can run `pnpm format` or `npm run format` to format the code.
diff --git a/package-lock.json b/package-lock.json
index 0b1b5f9..633b082 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,6 +24,7 @@
},
"devDependencies": {
"@types/node": "18.11.10",
+ "prettier": "^2.8.8",
"serve": "^14.2.0",
"typescript": "^4.9.3"
}
@@ -3603,6 +3604,21 @@
"resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.2.tgz",
"integrity":
"sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ=="
},
+ "node_modules/prettier": {
+ "version": "2.8.8",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
+ "integrity":
"sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
+ "dev": true,
+ "bin": {
+ "prettier": "bin-prettier.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
"node_modules/prop-types": {
"version": "15.8.1",
"resolved":
"https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
diff --git a/package.json b/package.json
index 7255ca0..7b46884 100644
--- a/package.json
+++ b/package.json
@@ -3,6 +3,8 @@
"version": "0.0.1",
"description": "Nextra docs template",
"scripts": {
+ "format": "prettier --write . --config ./.prettierrc",
+ "format:check": "prettier --check . --config ./.prettierrc",
"dev": "next dev",
"start": "next start",
"build": "next build && next export",
@@ -34,6 +36,7 @@
},
"devDependencies": {
"@types/node": "18.11.10",
+ "prettier": "^2.8.8",
"serve": "^14.2.0",
"typescript": "^4.9.3"
}
diff --git a/src/components/features/index.tsx
b/src/components/features/index.tsx
index 1dc1e2e..44bb0a7 100644
--- a/src/components/features/index.tsx
+++ b/src/components/features/index.tsx
@@ -1,9 +1,9 @@
-import type { ReactNode } from 'react'
-import Link from 'next/link'
-import cn from 'clsx'
-import { motion } from 'framer-motion'
+import type { ReactNode } from 'react';
+import Link from 'next/link';
+import cn from 'clsx';
+import { motion } from 'framer-motion';
-import styles from './style.module.css'
+import styles from './style.module.css';
export function Feature({
medium,
@@ -52,9 +52,9 @@ export function Feature({
</Link>
) : null}
</motion.div>
- )
+ );
}
export function Features({ children }: { children: ReactNode }) {
- return <div className={styles.features}>{children}</div>
-}
\ No newline at end of file
+ return <div className={styles.features}>{children}</div>;
+}
diff --git a/src/components/features/style.module.css
b/src/components/features/style.module.css
index b4abcca..76a6c17 100644
--- a/src/components/features/style.module.css
+++ b/src/components/features/style.module.css
@@ -1,133 +1,133 @@
.feature {
- position: relative;
- padding: 1.5rem 1.75rem;
- color: #000;
- background-color: white;
- overflow: hidden;
- border-radius: 0.75em;
- }
- .feature.medium {
- grid-column: span 2;
+ position: relative;
+ padding: 1.5rem 1.75rem;
+ color: #000;
+ background-color: white;
+ overflow: hidden;
+ border-radius: 0.75em;
+}
+.feature.medium {
+ grid-column: span 2;
+}
+.feature.large {
+ grid-column: span 3;
+}
+.feature.plain {
+ padding: 0;
+}
+.feature.centered {
+ text-align: center;
+}
+.feature h3 {
+ position: relative;
+ font-size: 34px;
+ font-size: min(34px, max(4vw, 24px));
+ font-weight: 600;
+ line-height: 1.25;
+ letter-spacing: -0.02rem;
+ z-index: 2;
+}
+:global(.dark) .feature:not(.light-only) {
+ color: #fff;
+ background-color: #202020;
+}
+.feature {
+ box-shadow: 0 8px 16px rgb(0 0 0 / 8%), 0 1px 2px rgb(0 0 0 / 4%),
+ 0 0 0 1px rgb(0 0 0 / 3%);
+ transition: box-shadow 0.3s ease;
+}
+:global(.dark) .feature {
+ box-shadow: 0 0 0 1px rgb(82 82 82 / 60%);
+}
+.feature .link {
+ position: absolute;
+ right: 1em;
+ bottom: 1em;
+ z-index: 2;
+ width: 2.5em;
+ height: 2.5em;
+ background-color: rgb(0 0 0 / 39%);
+ backdrop-filter: blur(10px);
+ border-radius: 50%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ color: rgba(255, 255, 255, 0.9);
+ box-shadow: 0 0 0 2px rgb(154 154 154 / 56%), 0 0 30px rgb(0 0 0 / 10%);
+ transition: all 0.2s ease;
+ -webkit-user-drag: none;
+}
+@media (hover: hover) {
+ .feature .link {
+ opacity: 0;
}
- .feature.large {
- grid-column: span 3;
+ .feature:hover .link {
+ opacity: 1;
}
- .feature.plain {
- padding: 0;
+ .feature .link:hover {
+ transform: scale(1.05);
+ color: rgba(255, 255, 255, 1);
+ background-color: rgba(64, 64, 64, 0.39);
+ box-shadow: 0 0 0 2px rgba(220, 220, 220, 0.56), 0 0 30px rgb(0 0 0 / 10%);
}
- .feature.centered {
- text-align: center;
+ .feature .link:active {
+ transform: scale(1);
+ color: rgba(255, 255, 255, 0.8);
+ background-color: rgba(22, 22, 22, 0.39);
+ box-shadow: 0 0 0 2px rgba(178, 178, 178, 0.56), 0 0 30px rgb(0 0 0 / 10%);
}
- .feature h3 {
- position: relative;
- font-size: 34px;
- font-size: min(34px, max(4vw, 24px));
- font-weight: 600;
- line-height: 1.25;
- letter-spacing: -0.02rem;
- z-index: 2;
+}
+
+.features {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ grid-gap: 2em;
+ font-feature-settings: initial;
+}
+
+.feature :global(.show-on-mobile) {
+ display: none;
+}
+
+@media screen and (max-width: 1024px) {
+ .feature {
+ max-width: 80vw;
+ width: 100%;
}
- :global(.dark) .feature:not(.light-only) {
- color: #fff;
- background-color: #202020;
+ .feature.large {
+ grid-column: span 1;
}
- .feature {
- box-shadow: 0 8px 16px rgb(0 0 0 / 8%), 0 1px 2px rgb(0 0 0 / 4%),
- 0 0 0 1px rgb(0 0 0 / 3%);
- transition: box-shadow 0.3s ease;
+ .features {
+ grid-template-columns: 1fr;
+ grid-gap: 3em;
+ justify-items: center;
}
- :global(.dark) .feature {
- box-shadow: 0 0 0 1px rgb(82 82 82 / 60%);
+ .feature h3 {
+ font-size: 28px;
+ font-size: min(28px, max(4vw, 22px));
+ text-align: center;
}
- .feature .link {
- position: absolute;
- right: 1em;
- bottom: 1em;
- z-index: 2;
- width: 2.5em;
- height: 2.5em;
- background-color: rgb(0 0 0 / 39%);
- backdrop-filter: blur(10px);
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- color: rgba(255, 255, 255, 0.9);
- box-shadow: 0 0 0 2px rgb(154 154 154 / 56%), 0 0 30px rgb(0 0 0 / 10%);
- transition: all 0.2s ease;
- -webkit-user-drag: none;
+}
+
+@media screen and (max-width: 640px) {
+ .feature {
+ max-width: 460px;
+ width: 100%;
}
- @media (hover: hover) {
- .feature .link {
- opacity: 0;
- }
- .feature:hover .link {
- opacity: 1;
- }
- .feature .link:hover {
- transform: scale(1.05);
- color: rgba(255, 255, 255, 1);
- background-color: rgba(64, 64, 64, 0.39);
- box-shadow: 0 0 0 2px rgba(220, 220, 220, 0.56), 0 0 30px rgb(0 0 0 /
10%);
- }
- .feature .link:active {
- transform: scale(1);
- color: rgba(255, 255, 255, 0.8);
- background-color: rgba(22, 22, 22, 0.39);
- box-shadow: 0 0 0 2px rgba(178, 178, 178, 0.56), 0 0 30px rgb(0 0 0 /
10%);
- }
+ .feature.large {
+ grid-column: span 1;
}
-
.features {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- grid-gap: 2em;
- font-feature-settings: initial;
+ grid-template-columns: 1fr;
+ grid-gap: 3em;
+ justify-items: center;
}
-
- .feature :global(.show-on-mobile) {
- display: none;
+ .feature h3 {
+ font-size: 34px;
+ font-size: min(34px, max(4vw, 22px));
+ text-align: center;
}
-
- @media screen and (max-width: 1024px) {
- .feature {
- max-width: 80vw;
- width: 100%;
- }
- .feature.large {
- grid-column: span 1;
- }
- .features {
- grid-template-columns: 1fr;
- grid-gap: 3em;
- justify-items: center;
- }
- .feature h3 {
- font-size: 28px;
- font-size: min(28px, max(4vw, 22px));
- text-align: center;
- }
+ .feature :global(.show-on-mobile) {
+ display: block;
}
-
- @media screen and (max-width: 640px) {
- .feature {
- max-width: 460px;
- width: 100%;
- }
- .feature.large {
- grid-column: span 1;
- }
- .features {
- grid-template-columns: 1fr;
- grid-gap: 3em;
- justify-items: center;
- }
- .feature h3 {
- font-size: 34px;
- font-size: min(34px, max(4vw, 22px));
- text-align: center;
- }
- .feature :global(.show-on-mobile) {
- display: block;
- }
- }
\ No newline at end of file
+}
diff --git a/src/components/map/index.tsx b/src/components/map/index.tsx
index c8892b4..65d6421 100644
--- a/src/components/map/index.tsx
+++ b/src/components/map/index.tsx
@@ -1,47 +1,51 @@
import React, { useRef, useEffect, useState } from 'react';
import maplibregl from 'maplibre-gl';
-import MaplibreInspect from './maplibre-gl-inspect.js';
-import MaplibreTileBoundaries from './maplibre-gl-tile-boundaries.js';
+import MaplibreInspect from
'@/lib/maplibre/dist/maplibre-gl-inspect/maplibre-gl-inspect';
+import MaplibreTileBoundaries from
'@/lib/maplibre/dist/maplibre-gl-tile-boundaries/maplibre-gl-tile-boundaries';
-import styles from './style.module.css'
+import styles from './style.module.css';
export default function Map() {
- const mapContainer = useRef(null);
- const map = useRef(null);
- const [lng] = useState(6.625);
- const [lat] = useState(46.510);
- const [zoom] = useState(14);
+ const mapContainer = useRef(null);
+ const map = useRef(null);
+ const [lng] = useState(6.625);
+ const [lat] = useState(46.51);
+ const [zoom] = useState(14);
- useEffect(() => {
- if (map.current) return;
- map.current = new maplibregl.Map({
- container: mapContainer.current,
- style: `https://demo.baremaps.com/style.json`,
- center: [lng, lat],
- zoom: zoom
- });
- map.current.addControl(new maplibregl.NavigationControl({}));
-
- // Add the inspect control to the map.
- map.current.addControl(new MaplibreInspect({
- showMapPopup: true,
- showMapPopupOnHover: false,
- showInspectMapPopupOnHover: false,
- popup: new maplibregl.Popup({
- closeButton: true,
- closeOnClick: true
- })
- }));
-
- // Add the tile boundaries control to the map.
- map.current.addControl(new MaplibreTileBoundaries({
- showBoundaries: false
- }));
+ useEffect(() => {
+ if (map.current) return;
+ map.current = new maplibregl.Map({
+ container: mapContainer.current,
+ style: `https://demo.baremaps.com/style.json`,
+ center: [lng, lat],
+ zoom: zoom
});
+ map.current.addControl(new maplibregl.NavigationControl({}));
- return (
- <div className={styles.wrap}>
- <div ref={mapContainer} className={styles.map} />
- </div>
+ // Add the inspect control to the map.
+ map.current.addControl(
+ new MaplibreInspect({
+ showMapPopup: true,
+ showMapPopupOnHover: false,
+ showInspectMapPopupOnHover: false,
+ popup: new maplibregl.Popup({
+ closeButton: true,
+ closeOnClick: true
+ })
+ })
);
-}
\ No newline at end of file
+
+ // Add the tile boundaries control to the map.
+ map.current.addControl(
+ new MaplibreTileBoundaries({
+ showBoundaries: false
+ })
+ );
+ });
+
+ return (
+ <div className={styles.wrap}>
+ <div ref={mapContainer} className={styles.map} />
+ </div>
+ );
+}
diff --git a/src/components/map/style.module.css
b/src/components/map/style.module.css
index 8b00578..509f84c 100644
--- a/src/components/map/style.module.css
+++ b/src/components/map/style.module.css
@@ -1,18 +1,18 @@
.wrap {
- position: relative;
- width: 100%;
- height: 100%;
- /* calculate height of the screen minus the heading */
+ position: relative;
+ width: 100%;
+ height: 100%;
+ /* calculate height of the screen minus the heading */
}
.map {
- position: absolute;
- color: black;
- border: solid 1px lightgray;
- border-radius: .75rem;
- width: 100%;
- height: 100%;
- overflow: hidden;
- /* this fixes the overflow:hidden for canvas - corresponds to 1 black
pixel */
- -webkit-mask-image:
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);
-}
\ No newline at end of file
+ position: absolute;
+ color: black;
+ border: solid 1px lightgray;
+ border-radius: 0.75rem;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ /* this fixes the overflow:hidden for canvas - corresponds to 1 black pixel
*/
+ -webkit-mask-image:
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);
+}
diff --git a/src/components/map/maplibre-gl-inspect.css
b/src/lib/maplibre/dist/maplibre-gl-inspect/maplibre-gl-inspect.css
similarity index 100%
rename from src/components/map/maplibre-gl-inspect.css
rename to src/lib/maplibre/dist/maplibre-gl-inspect/maplibre-gl-inspect.css
diff --git a/src/components/map/maplibre-gl-inspect.js
b/src/lib/maplibre/dist/maplibre-gl-inspect/maplibre-gl-inspect.js
similarity index 100%
rename from src/components/map/maplibre-gl-inspect.js
rename to src/lib/maplibre/dist/maplibre-gl-inspect/maplibre-gl-inspect.js
diff --git a/src/components/map/maplibre-gl-tile-boundaries.css
b/src/lib/maplibre/dist/maplibre-gl-tile-boundaries/maplibre-gl-tile-boundaries.css
similarity index 100%
rename from src/components/map/maplibre-gl-tile-boundaries.css
rename to
src/lib/maplibre/dist/maplibre-gl-tile-boundaries/maplibre-gl-tile-boundaries.css
diff --git a/src/components/map/maplibre-gl-tile-boundaries.js
b/src/lib/maplibre/dist/maplibre-gl-tile-boundaries/maplibre-gl-tile-boundaries.js
similarity index 100%
rename from src/components/map/maplibre-gl-tile-boundaries.js
rename to
src/lib/maplibre/dist/maplibre-gl-tile-boundaries/maplibre-gl-tile-boundaries.js
diff --git a/src/pages/_app.mdx b/src/pages/_app.mdx
index c763468..215d7b7 100644
--- a/src/pages/_app.mdx
+++ b/src/pages/_app.mdx
@@ -1,8 +1,7 @@
import 'maplibre-gl/dist/maplibre-gl.css';
-import '../components/map/maplibre-gl-inspect.css';
-import '../components/map/maplibre-gl-tile-boundaries.css';
-
+import '@/lib/maplibre/dist/maplibre-gl-inspect/maplibre-gl-inspect.css';
+import
'@/lib/maplibre/dist/maplibre-gl-tile-boundaries/maplibre-gl-tile-boundaries.css';
export default function App({ Component, pageProps }) {
- return <Component {...pageProps} />
-}
\ No newline at end of file
+ return <Component {...pageProps} />;
+}
diff --git a/src/pages/documentation/developer-manual.mdx
b/src/pages/documentation/developer-manual.mdx
index cde3ebf..1c925b8 100644
--- a/src/pages/documentation/developer-manual.mdx
+++ b/src/pages/documentation/developer-manual.mdx
@@ -9,9 +9,9 @@ The Developer Manual aims at helping developers to execute the
code, understand
Go into the relevant sections to find out more about Apache Baremaps.
- - [Project structure](/documentation/developer-manual/project-structure/)
- - [How to build with
Maven](/documentation/developer-manual/how-to-build-with-maven/)
- - [Set up in IntelliJ
IDEA](/documentation/developer-manual/setup-in-intellij/)
- - [Geocoder](/documentation/developer-manual/geocoder/)
- - [IP to location](/documentation/developer-manual/ip-to-location/)
- - [Stylesheet](/documentation/developer-manual/basemap)
+- [Project structure](/documentation/developer-manual/project-structure/)
+- [How to build with
Maven](/documentation/developer-manual/how-to-build-with-maven/)
+- [Set up in IntelliJ IDEA](/documentation/developer-manual/setup-in-intellij/)
+- [Geocoder](/documentation/developer-manual/geocoder/)
+- [IP to location](/documentation/developer-manual/ip-to-location/)
+- [Stylesheet](/documentation/developer-manual/basemap)
diff --git a/src/pages/documentation/developer-manual/_meta.json
b/src/pages/documentation/developer-manual/_meta.json
index 779a027..175cadf 100644
--- a/src/pages/documentation/developer-manual/_meta.json
+++ b/src/pages/documentation/developer-manual/_meta.json
@@ -6,4 +6,3 @@
"ip-to-location": "IP to Location",
"basemap": "Basemap"
}
-
\ No newline at end of file
diff --git a/src/pages/documentation/developer-manual/basemap.mdx
b/src/pages/documentation/developer-manual/basemap.mdx
index 320c428..24ec5c7 100644
--- a/src/pages/documentation/developer-manual/basemap.mdx
+++ b/src/pages/documentation/developer-manual/basemap.mdx
@@ -1,17 +1,15 @@
# Basemap
-Baremaps comes with a
-[default tileset and
stylesheet](https://github.com/apache/incubator-baremaps/tree/main/basemap)
+Baremaps comes with a
+[default tileset and
stylesheet](https://github.com/apache/incubator-baremaps/tree/main/basemap)
that can be used to generate vector tiles. The stylesheet is based on the
[OpenStreetMap Carto](https://github.com/gravitystorm/openstreetmap-carto)
-style.
+style.
It is an ongoing effort to create an attribution-free map style.
Your contributions are welcome.
-import Map from '../../../components/map'
+import Map from '@/components/map';
-<div style={{marginTop: 20, height: 450}}>
-<Map />
+<div style={{ marginTop: 20, height: 450 }}>
+ <Map />
</div>
-
-
diff --git a/src/pages/documentation/developer-manual/geocoder.mdx
b/src/pages/documentation/developer-manual/geocoder.mdx
index 0b3dc6a..ed45bcc 100644
--- a/src/pages/documentation/developer-manual/geocoder.mdx
+++ b/src/pages/documentation/developer-manual/geocoder.mdx
@@ -5,4 +5,4 @@ title: Geocoder
# Geocoder
-TODO
\ No newline at end of file
+TODO
diff --git
a/src/pages/documentation/developer-manual/how-to-build-with-maven.mdx
b/src/pages/documentation/developer-manual/how-to-build-with-maven.mdx
index ec9a210..184e7e0 100644
--- a/src/pages/documentation/developer-manual/how-to-build-with-maven.mdx
+++ b/src/pages/documentation/developer-manual/how-to-build-with-maven.mdx
@@ -1,20 +1,19 @@
-
# How to Build with Maven
This guide describes the basics of compiling Baremaps from source. In order to
run Apache Baremaps, you first need to install Java 17 or a later version.
[SDKMAN](https://sdkman.io/) provides a convenient Command Line Interface
(CLI) to install and upgrade Java. We also suggest you use the most recent
version of Maven
-to compile [(at least 3.x.x)](https://maven.apache.org/download.cgi).
+to compile [(at least 3.x.x)](https://maven.apache.org/download.cgi).
### Linux or OSX
-To start you can run the command `./mvnw clean package -DskipTests` from the
root folder of the Baremaps project. Upon successful
-compilation you should see something similar to the following output in your
terminal.
+To start you can run the command `./mvnw clean package -DskipTests` from the
root folder of the Baremaps project. Upon successful
+compilation you should see something similar to the following output in your
terminal.
```bash
[INFO] Building tar:
/path-to-project/baremaps-cli/target/apache-baremaps-0.7.2-SNAPSHOT-incubating-bin.tar.gz
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for baremaps 0.7.2-SNAPSHOT:
-[INFO]
+[INFO]
[INFO] baremaps ........................................... SUCCESS [ 4.172 s]
[INFO] baremaps-core ...................................... SUCCESS [ 59.018 s]
[INFO] baremaps-benchmark ................................. SUCCESS [ 1.775 s]
@@ -25,7 +24,7 @@ compilation you should see something similar to the following
output in your ter
```
It is important to note the first line in the output above that notes where
the location of the `baremaps-cli` binary file resides.
-Referencing the location of the `baremaps-cli` binary file, you can run the
following to untar
+Referencing the location of the `baremaps-cli` binary file, you can run the
following to untar
and place Baremaps into your `PATH`.
```bash
diff --git a/src/pages/documentation/developer-manual/ip-to-location.mdx
b/src/pages/documentation/developer-manual/ip-to-location.mdx
index 53954c0..c38bcc6 100644
--- a/src/pages/documentation/developer-manual/ip-to-location.mdx
+++ b/src/pages/documentation/developer-manual/ip-to-location.mdx
@@ -5,32 +5,32 @@ title: IP to location
# IP to location
-Using data publicly available from the 5 [Regional Internet Registries
(RIRs)](https://whatismyipaddress.com/rir)
-we are able to generate a stream of objects detailing Internet resource
allocations. We call these NIC Objects
+Using data publicly available from the 5 [Regional Internet Registries
(RIRs)](https://whatismyipaddress.com/rir)
+we are able to generate a stream of objects detailing Internet resource
allocations. We call these NIC Objects
(Network Information Centre Objects).
Here is the list of the 5 RIRs.
- - [ARIN](https://www.arin.net/)
- - [LACNIC](https://www.lacnic.net/)
- - [AFRINIC](https://afrinic.net/)
- - [RIPE NCC](https://www.ripe.net/)
- - [APNIC](https://www.apnic.net/)
+- [ARIN](https://www.arin.net/)
+- [LACNIC](https://www.lacnic.net/)
+- [AFRINIC](https://afrinic.net/)
+- [RIPE NCC](https://www.ripe.net/)
+- [APNIC](https://www.apnic.net/)
Using the list of NIC objects, we extract those that concern IPv4 address
ranges
([INETNUM](https://www.ripe.net/manage-ips-and-asns/db/support/documentation/ripe-database-documentation/rpsl-object-types/4-2-descriptions-of-primary-objects/4-2-4-description-of-the-inetnum-object))
-, then using the Baremaps Geocoder API, we iterate through the extracted NIC
objects to geo-locate each one of them.
+, then using the Baremaps Geocoder API, we iterate through the extracted NIC
objects to geo-locate each one of them.
The resulting geo-localised IPv4 address ranges are stored in a SQLite
database which can be easily queried to geo-locate a specific IP.
-A NIC object contains a list of attributes but these attributes are not
consistent between each NIC object.
-We try to use these 4 attributes to query the Geocoder service :
+A NIC object contains a list of attributes but these attributes are not
consistent between each NIC object.
+We try to use these 4 attributes to query the Geocoder service :
-- *address* contains the address of the NIC Object
-- *descr* sometimes contains the address of the NIC Object
-- *country* contains the country code in ISO format (ISO 3166) - [RIPE list of
country
codes](https://www.ripe.net/participate/member-support/list-of-members/list-of-country-codes-and-rirs)
-- *geoloc* contains the latitude and longitude which can be used directly
+- _address_ contains the address of the NIC Object
+- _descr_ sometimes contains the address of the NIC Object
+- _country_ contains the country code in ISO format (ISO 3166) - [RIPE list of
country
codes](https://www.ripe.net/participate/member-support/list-of-members/list-of-country-codes-and-rirs)
+- _geoloc_ contains the latitude and longitude which can be used directly
-Some NIC Objects contain a reference to an organisation, and the
organisation's NIC Object itself contains the
+Some NIC Objects contain a reference to an organisation, and the
organisation's NIC Object itself contains the
geo-localisation information. However, we don't make use of that for now.
The [structure of the RIPE
database](https://www.ripe.net/manage-ips-and-asns/db/support/documentation/ripe-database-documentation/ripe-database-structure)
@@ -65,14 +65,14 @@ iploc serve --database iploc.db --port 3000
In order to generate the SQLite database that contains the geo-localised IP
address ranges you must follow a few steps.
-1) First you need to load/build a Geocoder which will be used to query the
addresses contained in the NIC objects.
+1. First you need to load/build a Geocoder which will be used to query the
addresses contained in the NIC objects.
```java
Geocoder geocoder = new GeonamesGeocoder(indexPath, dataUri);
geocoder.build();
```
-2) Then you need to generate a Stream of NIC Objects. You can use the Nic
Fetcher to automatically download all of the NIC Objects from the 5 RIRs.
+2. Then you need to generate a Stream of NIC Objects. You can use the Nic
Fetcher to automatically download all of the NIC Objects from the 5 RIRs.
```java
Stream<Path> nicPathsStream = new NicFetcher().fetch();
@@ -87,14 +87,14 @@ Stream<NicObject> nicObjectStream =
});
```
-3) You need to create the IpLoc service, giving the target SQLite database url
and the geocoder in the second parameter
+3. You need to create the IpLoc service, giving the target SQLite database url
and the geocoder in the second parameter
```java
SqliteUtils.executeResource(databaseUrl, "iploc_init.sql"); // Init the SQLite
database
IpLoc ipLoc = new IpLoc(databaseUrl, geocoder);
```
-4) Finally insert the stream of NIC objects in the database with the IpLoc
service
+4. Finally insert the stream of NIC objects in the database with the IpLoc
service
```java
ipLoc.insertNicObjects(nicObjects.stream());
@@ -103,8 +103,9 @@ ipLoc.insertNicObjects(nicObjects.stream());
## Notes
There are many improvements that need to be worked on to improve the Iploc
module, refer to the Github issues with the
-tag *iploc* if you want to contribute.
+tag _iploc_ if you want to contribute.
## References
+
- [https://www.iana.org/numbers](https://www.iana.org/numbers)
- [https://www.irr.net/docs/list.html](https://www.irr.net/docs/list.html)
diff --git a/src/pages/documentation/developer-manual/project-structure.mdx
b/src/pages/documentation/developer-manual/project-structure.mdx
index 8c11b89..576fed7 100644
--- a/src/pages/documentation/developer-manual/project-structure.mdx
+++ b/src/pages/documentation/developer-manual/project-structure.mdx
@@ -13,4 +13,4 @@ TODO
### Baremaps-core
-TODO
\ No newline at end of file
+TODO
diff --git a/src/pages/documentation/developer-manual/setup-in-intellij.mdx
b/src/pages/documentation/developer-manual/setup-in-intellij.mdx
index d6a751e..592efb8 100644
--- a/src/pages/documentation/developer-manual/setup-in-intellij.mdx
+++ b/src/pages/documentation/developer-manual/setup-in-intellij.mdx
@@ -9,4 +9,4 @@ To open the project with IntelliJ, go under file -> open -> ...
There are a few pre-created configurations to run the code quickly.
-TODO
\ No newline at end of file
+TODO
diff --git a/src/pages/documentation/examples/_meta.json
b/src/pages/documentation/examples/_meta.json
index d313028..6b31282 100644
--- a/src/pages/documentation/examples/_meta.json
+++ b/src/pages/documentation/examples/_meta.json
@@ -1,10 +1,9 @@
{
- "import-osm-into-postgis": "Import OpenStreetMap into PostGIS",
- "import-naturalearth-into-postgis": "Import Natural Earth data into
PostGIS",
- "serve-and-export-vector-tiles": "Serve and Export Vector Tiles from
PostGIS",
- "import-contour-into-postgis": "Contour Lines in Vector Tiles",
- "extrusion": "Extrusion of vector tiles from OSM data",
- "ip-to-location": "Create an IP to location web service",
- "geocoding": "Create a geocoding web service"
- }
-
\ No newline at end of file
+ "import-osm-into-postgis": "Import OpenStreetMap into PostGIS",
+ "import-naturalearth-into-postgis": "Import Natural Earth data into PostGIS",
+ "serve-and-export-vector-tiles": "Serve and Export Vector Tiles from
PostGIS",
+ "import-contour-into-postgis": "Contour Lines in Vector Tiles",
+ "extrusion": "Extrusion of vector tiles from OSM data",
+ "ip-to-location": "Create an IP to location web service",
+ "geocoding": "Create a geocoding web service"
+}
diff --git a/src/pages/documentation/examples/extrusion.mdx
b/src/pages/documentation/examples/extrusion.mdx
index b50ffff..d662230 100644
--- a/src/pages/documentation/examples/extrusion.mdx
+++ b/src/pages/documentation/examples/extrusion.mdx
@@ -72,7 +72,6 @@ Well done, a map of London with extruded buildings should now
appear in your [br

-
## Conclusion
In this tutorial, we learnt how to import OSM data in PostGIS with a workflow
and then use the MVT specification to extrude the vector tiles into a 3d object.
diff --git a/src/pages/documentation/examples/geocoding.mdx
b/src/pages/documentation/examples/geocoding.mdx
index 24d8af5..1a11745 100644
--- a/src/pages/documentation/examples/geocoding.mdx
+++ b/src/pages/documentation/examples/geocoding.mdx
@@ -31,5 +31,5 @@ Go to [http://localhost:9000/](http://localhost:9000/) to see
it in action.
## Conclusion
-In this tutorial, we learnt how to create a Geocoding index and serve it in a
simple web application.
+In this tutorial, we learnt how to create a Geocoding index and serve it in a
simple web application.
This will be very useful in a map application to find places quickly by
writing an address in a prompt.
diff --git a/src/pages/documentation/examples/import-contour-into-postgis.mdx
b/src/pages/documentation/examples/import-contour-into-postgis.mdx
index b515e42..3da80a3 100644
--- a/src/pages/documentation/examples/import-contour-into-postgis.mdx
+++ b/src/pages/documentation/examples/import-contour-into-postgis.mdx
@@ -5,15 +5,15 @@ title: Contour Lines in Vector Tiles
# Contour Lines in Vector Tiles
-Contour lines are a key element in topographic maps, as they allow us to
-visualize the elevation of an area. In this tutorial, we will show you how
-to create contour lines from a digital elevation model (DEM) and display
+Contour lines are a key element in topographic maps, as they allow us to
+visualize the elevation of an area. In this tutorial, we will show you how
+to create contour lines from a digital elevation model (DEM) and display
them using vector tiles.
## Prerequisites
-To follow this tutorial, you will need to have `gdal` installed on your
-system. If you don't have it already, you can install it by running the
+To follow this tutorial, you will need to have `gdal` installed on your
+system. If you don't have it already, you can install it by running the
following command:
```bash
@@ -22,10 +22,10 @@ sudo apt-get install gdal-bin
## Reprojecting the GeoTiff
-We will be using the [ASTER](https://asterweb.jpl.nasa.gov/gdem.asp) dataset
-for this example. The geotiff file provided in this tutorial is already in
-the desired projection (WebMercator), but in case you want to use a different
-geotiff file, you can use the gdalwarp command to reproject it. Here's an
+We will be using the [ASTER](https://asterweb.jpl.nasa.gov/gdem.asp) dataset
+for this example. The geotiff file provided in this tutorial is already in
+the desired projection (WebMercator), but in case you want to use a different
+geotiff file, you can use the gdalwarp command to reproject it. Here's an
example of how to do it:
```
@@ -38,11 +38,11 @@ gdalwarp -rc \
## Generating the Contour Lines
-Now that we have the GeoTiff in the desired projection,
-we can use the gdal_contour command to generate the contour lines.
-The `-a` argument specifies the column that contains the elevation data,
-the `-i` argument specifies the interval at which contours
-should be generated (in this case, we are using 10 meters),
+Now that we have the GeoTiff in the desired projection,
+we can use the gdal_contour command to generate the contour lines.
+The `-a` argument specifies the column that contains the elevation data,
+the `-i` argument specifies the interval at which contours
+should be generated (in this case, we are using 10 meters),
and the `-nln` argument names the table that will contain the data.
```
@@ -54,8 +54,8 @@ gdal_contour \
## Improving Performance with Indexes
-To improve the performance of the contour lines,
-we can add some indexes to the database.
+To improve the performance of the contour lines,
+we can add some indexes to the database.
Here's an example of how to create a `SPGIST` index:
```postgresql
@@ -65,7 +65,7 @@ CREATE INDEX IF NOT EXISTS aster_dem_gix ON aster_dem USING
SPGIST(wkb_geometry)
## Displaying the Contour Lines
-Finally, we can use Baremaps to display the contour lines in a web browser.
+Finally, we can use Baremaps to display the contour lines in a web browser.
To do this, run the following command:
```bash
@@ -75,15 +75,15 @@ baremaps map dev \
--style 'style.json'
```
-This will start the tile server and automatically reload the configuration
-files when you make changes. You can then preview the map in your
+This will start the tile server and automatically reload the configuration
+files when you make changes. You can then preview the map in your
web browser.
## Optional: Smoothing the Contour Lines
-If you want to improve the rendering of the contour lines, you can use
-a smoothing function like ST_ChaikinSmoothing. This function takes
-a geometry as input and returns a smoothed version of that geometry.
+If you want to improve the rendering of the contour lines, you can use
+a smoothing function like ST_ChaikinSmoothing. This function takes
+a geometry as input and returns a smoothed version of that geometry.
Here's an example of how you could use it:
```postgresql
@@ -91,10 +91,10 @@ UPDATE aster_dem
SET wkb_geometry = ST_ChaikinSmoothing(wkb_geometry, 0.1)
```
-Keep in mind that this step is optional and might not be necessary depending
-on the quality of your input data. You can experiment with different
-smoothing parameters to find the best balance between smoothness and
+Keep in mind that this step is optional and might not be necessary depending
+on the quality of your input data. You can experiment with different
+smoothing parameters to find the best balance between smoothness and
preservation of original features.
-That's it! You now know how to generate and display contour lines from
-a digital elevation model using vector tiles. Happy mapping!
\ No newline at end of file
+That's it! You now know how to generate and display contour lines from
+a digital elevation model using vector tiles. Happy mapping!
diff --git a/src/pages/documentation/examples/import-osm-into-postgis.mdx
b/src/pages/documentation/examples/import-osm-into-postgis.mdx
index 2be40a0..f4ded21 100644
--- a/src/pages/documentation/examples/import-osm-into-postgis.mdx
+++ b/src/pages/documentation/examples/import-osm-into-postgis.mdx
@@ -15,7 +15,7 @@ Also, if you are in a hurry, consider skipping the "Under the
Hood" sections.
OpenStreetMap (OSM) is a free and editable map of the world.
It is maintained by a community of passionate volunteers in a way which is
similar to Wikipedia.
-Every week, OpenStreetMap publishes a [full
dump](https://planet.openstreetmap.org/) of its data in two flavours: a large
XML file of about 90GB and a more compact binary file of about 50GB in the
[Protocol Buffer Format](https://developers.google.com/protocol-buffers) (PBF).
+Every week, OpenStreetMap publishes a [full
dump](https://planet.openstreetmap.org/) of its data in two flavours: a large
XML file of about 90GB and a more compact binary file of about 50GB in the
[Protocol Buffer Format](https://developers.google.com/protocol-buffers) (PBF).
As processing such large files can take several hours,
[Geofabrik](http://www.geofabrik.de/data/download.html) regularly publishes
smaller extracts of OSM for specific regions.
In this example we will use a tiny extract of OSM for
[Liechtenstein](https://en.wikipedia.org/wiki/Liechtenstein), which is suitable
for fast experiments.
@@ -75,5 +75,5 @@ The following Figure displays the schema of the PostGIS
database created by Bare
In this tutorial, we learnt how to import OpenStreetMap data in PostGIS.
-Now that you have inserted the OSM data into the PostGIS database, you can use
follow the [Serve Vector Tiles from
PostGIS](/documentation/examples/serve-and-export-vector-tiles/) example to
serve
+Now that you have inserted the OSM data into the PostGIS database, you can use
follow the [Serve Vector Tiles from
PostGIS](/documentation/examples/serve-and-export-vector-tiles/) example to
serve
your PostGIS data directly as Vector Tiles in a web application with live
reload capabilities.
diff --git a/src/pages/documentation/examples/serve-and-export-vector-tiles.mdx
b/src/pages/documentation/examples/serve-and-export-vector-tiles.mdx
index d005da8..7bf6438 100644
--- a/src/pages/documentation/examples/serve-and-export-vector-tiles.mdx
+++ b/src/pages/documentation/examples/serve-and-export-vector-tiles.mdx
@@ -19,8 +19,8 @@ If you are in a hurry, consider skipping the "Under the Hood"
sections.
In order to create vector tiles, Apache Baremaps requires JSON configuration
files. The two configuration files used are:
- - `tileset.json` - Defines all the information needed to retrieve the correct
vector tile layers at different zoom levels.
- - `style.json` - Defines the style of the different layers.
+- `tileset.json` - Defines all the information needed to retrieve the correct
vector tile layers at different zoom levels.
+- `style.json` - Defines the style of the different layers.
For convenience, we have prepared a `tileset.json` and a `style.json` that
correspond to each of the examples.
diff --git a/src/pages/documentation/getting-started.md
b/src/pages/documentation/getting-started.md
index 4e1d83f..6271b7b 100644
--- a/src/pages/documentation/getting-started.md
+++ b/src/pages/documentation/getting-started.md
@@ -5,7 +5,7 @@ title: Getting Started
# Getting Started
-This section will get you started with the setup of Apache Baremaps to execute
the examples. If you plan on running the
+This section will get you started with the setup of Apache Baremaps to execute
the examples. If you plan on running the
code directly, or using Apache Baremaps as a library, you should refer to the
[Developer Manual](/developer-manual/).
After installing the necessary components, the
[Examples](/documentation/examples/) explain how to use Apache Baremaps to
create a vector tileset from an OpenStreetMap extract, create an IP to location
web service, and much more.
diff --git a/src/pages/documentation/getting-started/_meta.json
b/src/pages/documentation/getting-started/_meta.json
index 4927434..5788dec 100644
--- a/src/pages/documentation/getting-started/_meta.json
+++ b/src/pages/documentation/getting-started/_meta.json
@@ -1,4 +1,4 @@
{
- "installing-the-cli": "Installing the CLI",
- "installing-postgis": "Installing PostGIS"
+ "installing-the-cli": "Installing the CLI",
+ "installing-postgis": "Installing PostGIS"
}
diff --git a/src/pages/documentation/getting-started/installing-the-cli.mdx
b/src/pages/documentation/getting-started/installing-the-cli.mdx
index 324b109..7ac8c90 100644
--- a/src/pages/documentation/getting-started/installing-the-cli.mdx
+++ b/src/pages/documentation/getting-started/installing-the-cli.mdx
@@ -3,7 +3,7 @@ layout: default
title: Installing the CLI
---
-# Installing the CLI
+# Installing the CLI
In order to run Apache Baremaps, you first need to install Java 17 or a later
version.
[SDKMAN](https://sdkman.io/) provides a convenient Command Line Interface
(CLI) to install and upgrade Java.
diff --git a/src/pages/documentation/index.mdx
b/src/pages/documentation/index.mdx
index 3ecc3ea..420870f 100644
--- a/src/pages/documentation/index.mdx
+++ b/src/pages/documentation/index.mdx
@@ -1,13 +1,12 @@
-
# Introduction
-Apache Baremaps is an [open
source](https://github.com/apache/incubator-baremaps/blob/main/LICENSE) toolkit
and a set of infrastructure components for creating, publishing, and operating
online maps. It provides a data pipeline enabling developers to build maps with
different data sources. It offers live reload capabilities that allow
cartographers to customize the content and the style of a map. It includes an
attribution-free map schema and style that stimulates derived work. Finally,
[...]
+Apache Baremaps is an [open
source](https://github.com/apache/incubator-baremaps/blob/main/LICENSE) toolkit
and a set of infrastructure components for creating, publishing, and operating
online maps. It provides a data pipeline enabling developers to build maps with
different data sources. It offers live reload capabilities that allow
cartographers to customize the content and the style of a map. It includes an
attribution-free map schema and style that stimulates derived work. Finally,
[...]
Apache Baremaps is inspired by
[Osmosis](https://github.com/openstreetmap/osmosis), but it comes with
additional features, such as the ability to:
-- Process data in parallel with the [Stream
API](https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html)
introduced in Java 8
-- Import data faster with the [COPY
API](https://www.postgresql.org/docs/11/sql-copy.html) of Postgresql
-- Create postgis geometries on the fly with
[JTS](https://github.com/locationtech/jts)
-- Create and serve customized [Vector
Tiles](https://docs.mapbox.com/vector-tiles/specification/)
+- Process data in parallel with the [Stream
API](https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html)
introduced in Java 8
+- Import data faster with the [COPY
API](https://www.postgresql.org/docs/11/sql-copy.html) of Postgresql
+- Create postgis geometries on the fly with
[JTS](https://github.com/locationtech/jts)
+- Create and serve customized [Vector
Tiles](https://docs.mapbox.com/vector-tiles/specification/)
-On the longer run, the project aims to work with a variety of data sources in
order to create highly specialized and customized maps.
\ No newline at end of file
+On the longer run, the project aims to work with a variety of data sources in
order to create highly specialized and customized maps.
diff --git a/src/pages/download/_meta.json b/src/pages/download/_meta.json
index 0005f16..58ebc2c 100644
--- a/src/pages/download/_meta.json
+++ b/src/pages/download/_meta.json
@@ -1,4 +1,3 @@
{
- "release-0.7.1": "Release 0.7.1"
+ "release-0.7.1": "Release 0.7.1"
}
-
\ No newline at end of file
diff --git a/src/pages/index.mdx b/src/pages/index.mdx
index f14feee..59c90be 100644
--- a/src/pages/index.mdx
+++ b/src/pages/index.mdx
@@ -2,51 +2,62 @@
title: Mapping Infrastructure Made Easy
---
-import Link from 'next/link'
-import Image from 'next/image'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faMap } from '@fortawesome/free-regular-svg-icons'
-import Map from '../components/map'
-import { Features, Feature } from '../components/features'
+import Link from 'next/link';
+import Image from 'next/image';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faMap } from '@fortawesome/free-regular-svg-icons';
+import Map from '@/components/map';
+import { Features, Feature } from '@/components/features';
-import styles from './index.module.css'
+import styles from './index.module.css';
<div className="home-content">
<div className="content-container">
<h1 className="headline">Apache Baremaps</h1>
<h2 className="title">Mapping Infrastructure Made Easy</h2>
- <p className="subtitle">Apache Baremaps is a toolkit and a set of
infrastructure components <br className='sm:block hidden'/> for creating,
publishing, and operating online maps.</p>
- <p className="subtitle">
- <Link className={styles.cta} href="/documentation">Get started
<span>→</span></Link>
- </p>
+ <div className="subtitle">
+ Apache Baremaps is a toolkit and a set of infrastructure components{' '}
+ <br className="sm:block hidden" /> for creating, publishing, and
operating
+ online maps.
+ </div>
+ <div className="subtitle">
+ <Link className={styles.cta} href="/documentation">
+ Get started <span>→</span>
+ </Link>
+ </div>
</div>
<div className="features-container">
<div className="content-container">
<Features>
- <Feature index={0} plain large style={{height: 600}}>
+ <Feature index={0} plain large style={{ height: 600 }}>
<Map />
</Feature>
<Feature index={0}>
<h3>Data Pipeline</h3>
<div>
- With Baremaps, you can easily create custom data pipelines to
consolidate your spatial datasets in PostGIS.
- Baremaps supports several popular formats such as OsmPbf,
ShapeFile, GeoPackage, and FlatGeoBuf, allowing you to seamlessly integrate
with your existing workflows.
+ With Baremaps, you can easily create custom data pipelines to
+ consolidate your spatial datasets in PostGIS. Baremaps supports
+ several popular formats such as OsmPbf, ShapeFile, GeoPackage, and
+ FlatGeoBuf, allowing you to seamlessly integrate with your existing
+ workflows.
</div>
</Feature>
<Feature index={0}>
<h3>Vector Tiles</h3>
<div>
- Baremaps allows you to easily serve and publish custom vector
tiles from PostGIS.
- Whether you need to create maps for web or mobile applications,
Baremaps makes it simple and efficient.
- Additionally, we are continuously working on developing a
high-quality base map.
+ Baremaps allows you to easily serve and publish custom vector tiles
+ from PostGIS. Whether you need to create maps for web or mobile
+ applications, Baremaps makes it simple and efficient. Additionally,
+ we are continuously working on developing a high-quality base map.
</div>
</Feature>
<Feature index={0}>
<h3>Contributing</h3>
<div>
- Whether you're an experienced or just getting started, there are
many ways to get involved.
- We are experimenting with a range of new components, including IP
to location, 3D Tiles Next, and geocoding, and would love your help.
- Let's create something amazing together!
+ Whether you're an experienced or just getting started, there are
+ many ways to get involved. We are experimenting with a range of new
+ components, including IP to location, 3D Tiles Next, and geocoding,
+ and would love your help. Let's create something amazing together!
</div>
</Feature>
</Features>
@@ -55,62 +66,62 @@ import styles from './index.module.css'
</div>
<style jsx>{`
- .content-container {
- max-width: 90rem;
- padding-left: max(env(safe-area-inset-left),1.5rem);
- padding-right: max(env(safe-area-inset-right),1.5rem);
- margin: 0 auto;
- }
- .features-container {
- margin: 8rem 0 0;
- padding: 4rem 0;
- background-color: #f3f4f6;
- border-bottom: 1px solid #e5e7eb;
- }
- .features-container .content-container {
- margin-top: -8rem;
- }
- :global(.dark) .features-container {
- background-color: #000;
- border-bottom: 1px solid rgb(38,38,38);
- }
+ .content-container {
+ max-width: 90rem;
+ padding-left: max(env(safe-area-inset-left), 1.5rem);
+ padding-right: max(env(safe-area-inset-right), 1.5rem);
+ margin: 0 auto;
+ }
+ .features-container {
+ margin: 8rem 0 0;
+ padding: 4rem 0;
+ background-color: #f3f4f6;
+ border-bottom: 1px solid #e5e7eb;
+ }
+ .features-container .content-container {
+ margin-top: -8rem;
+ }
+ :global(.dark) .features-container {
+ background-color: #000;
+ border-bottom: 1px solid rgb(38, 38, 38);
+ }
+ .headline {
+ display: block;
+ font-size: 3.125rem;
+ font-size: min(4.375rem, max(8vw, 2.5rem));
+ font-weight: 3;
+ font-feature-settings: initial;
+ letter-spacing: -0.12rem;
+ margin-left: -0.2rem;
+ margin-top: 3.4rem;
+ line-height: 1.1;
+ }
+ .title {
+ display: block;
+ font-size: 3.125rem;
+ font-size: min(4.375rem, max(8vw, 2.5rem));
+ font-weight: 700;
+ font-feature-settings: initial;
+ letter-spacing: -0.12rem;
+ margin-top: 1rem;
+ margin-left: -0.2rem;
+ line-height: 1.1;
+ }
+ .subtitle {
+ margin-top: 1.5rem;
+ font-size: 1.3rem;
+ font-size: min(1.3rem, max(3.5vw, 1.2rem));
+ font-feature-settings: initial;
+ line-height: 1.6;
+ }
+ .nextjs-link {
+ color: currentColor;
+ text-decoration: none;
+ font-weight: 600;
+ }
+ @media screen and (max-width: 1200px) {
.headline {
- display: block;
- font-size: 3.125rem;
- font-size: min(4.375rem, max(8vw, 2.5rem));
- font-weight: 3;
- font-feature-settings: initial;
- letter-spacing: -.12rem;
- margin-left: -0.2rem;
- margin-top: 3.4rem;
- line-height: 1.1;
- }
- .title {
- display: block;
- font-size: 3.125rem;
- font-size: min(4.375rem, max(8vw, 2.5rem));
- font-weight: 700;
- font-feature-settings: initial;
- letter-spacing: -.12rem;
- margin-top: 1rem;
- margin-left: -0.2rem;
- line-height: 1.1;
- }
- .subtitle {
- margin-top: 1.5rem;
- font-size: 1.3rem;
- font-size: min(1.3rem, max(3.5vw, 1.2rem));
- font-feature-settings: initial;
- line-height: 1.6;
- }
- .nextjs-link {
- color: currentColor;
- text-decoration: none;
- font-weight: 600;
- }
- @media screen and (max-width: 1200px) {
- .headline {
- letter-spacing: -.08rem;
- }
+ letter-spacing: -0.08rem;
}
- `}</style>
\ No newline at end of file
+ }
+`}</style>
diff --git a/theme.config.tsx b/theme.config.tsx
index 5815b76..ee54d4e 100644
--- a/theme.config.tsx
+++ b/theme.config.tsx
@@ -1,45 +1,67 @@
-import React from 'react'
-import { DocsThemeConfig } from 'nextra-theme-docs'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faMap } from '@fortawesome/free-regular-svg-icons'
+import React from 'react';
+import { DocsThemeConfig } from 'nextra-theme-docs';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faMap } from '@fortawesome/free-regular-svg-icons';
+
const config: DocsThemeConfig = {
logo: (
<>
- <FontAwesomeIcon style={{ height: 26}} icon={faMap} />
- <span style={{ marginLeft: '.4rem', fontWeight: 800, fontSize: 16 }}>
Apache Baremaps (incubating)</span>
+ <FontAwesomeIcon style={{ height: 26 }} icon={faMap} />
+ <span style={{ marginLeft: '.4rem', fontWeight: 800, fontSize: 16 }}>
+ Apache Baremaps (incubating)
+ </span>
</>
),
project: {
- link: 'https://github.com/apache/incubator-baremaps/',
+ link: 'https://github.com/apache/incubator-baremaps/'
},
feedback: {
useLink: () => 'https://github.com/apache/incubator-baremaps/issues/new'
},
- docsRepositoryBase:
'https://github.com/apache/incubator-baremaps-site/blob/main/',
+ docsRepositoryBase:
+ 'https://github.com/apache/incubator-baremaps-site/blob/main/',
footer: {
- text: 'Copyright © ' + new Date().getFullYear() + ' Apache Software
Foundation',
+ text:
+ 'Copyright © ' + new Date().getFullYear() + ' Apache Software Foundation'
},
sidebar: {
defaultMenuCollapseLevel: 1
},
useNextSeoProps() {
return {
- titleTemplate: '%s – Apache Baremaps'
- }
+ titleTemplate: '%s - Apache Baremaps'
+ };
},
head: (
<>
{/* Favicons generated with https://realfavicongenerator.net */}
- <link rel="apple-touch-icon" sizes="180x180"
href="/apple-touch-icon.png"/>
- <link rel="icon" type="image/png" sizes="32x32"
href="/favicon-32x32.png"/>
- <link rel="icon" type="image/png" sizes="16x16"
href="/favicon-16x16.png"/>
- <link rel="manifest" href="/site.webmanifest"/>
- <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000"/>
- <meta name="msapplication-TileColor" content="#ffffff"/>
- <meta name="theme-color" content="#ffffff"/>
- <meta name="ahrefs-site-verification"
content="ef8280f8481d5ba95a69da0c39d5a06efcc8b8d55820581438c243e12b613846" />
+ <link
+ rel="apple-touch-icon"
+ sizes="180x180"
+ href="/apple-touch-icon.png"
+ />
+ <link
+ rel="icon"
+ type="image/png"
+ sizes="32x32"
+ href="/favicon-32x32.png"
+ />
+ <link
+ rel="icon"
+ type="image/png"
+ sizes="16x16"
+ href="/favicon-16x16.png"
+ />
+ <link rel="manifest" href="/site.webmanifest" />
+ <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000" />
+ <meta name="msapplication-TileColor" content="#ffffff" />
+ <meta name="theme-color" content="#ffffff" />
+ <meta
+ name="ahrefs-site-verification"
+
content="ef8280f8481d5ba95a69da0c39d5a06efcc8b8d55820581438c243e12b613846"
+ />
</>
- ),
-}
+ )
+};
-export default config
+export default config;
diff --git a/tsconfig.json b/tsconfig.json
index 1563f3e..8a5ec4f 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -13,7 +13,11 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
- "jsx": "preserve"
+ "jsx": "preserve",
+ "baseUrl": ".",
+ "paths": {
+ "@/*": ["src/*"]
+ }
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]