From 391983ba621f65c7af6da5446b6d9d39f92e356a Mon Sep 17 00:00:00 2001 From: Thomas Mills Date: Tue, 23 Jul 2024 13:57:17 +0200 Subject: [PATCH] Maps project page (#27) * Fix repo path in import script and add exception for new projects docs dir * maps project docs page added * Fix URL * Update project URL * Hide edit URL --- docs/projects/maps.md | 9 +++++++++ scripts/import.js | 4 ++-- scripts/import.ts | 4 ++-- sidebars.ts | 5 +++++ 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 docs/projects/maps.md diff --git a/docs/projects/maps.md b/docs/projects/maps.md new file mode 100644 index 0000000..3221ee1 --- /dev/null +++ b/docs/projects/maps.md @@ -0,0 +1,9 @@ +--- +custom_edit_url: null +--- + +# Leaflet maps in React + +Amsterdam's preferred map library is Leaflet and frontend framework is React. Combining Leaflet with the React component lifecycle can provide some challenges. Therefore, we have created a repository and Storybook application to browse common map components and feature examples. + +You can browse the project at [https://amsterdam.github.io/ee-react-map-demos](https://amsterdam.github.io/ee-react-map-demos). diff --git a/scripts/import.js b/scripts/import.js index f0662a7..a82f72d 100644 --- a/scripts/import.js +++ b/scripts/import.js @@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var simple_git_1 = require("simple-git"); var fs = require("fs"); var path = require("path"); -var remoteUrl = 'https://github.com/Amsterdam/development-standards'; +var remoteUrl = 'git@github.com:Amsterdam/development-standards.git'; var localDir = 'docs'; var cloneDir = path.join(localDir, 'latest'); function cloneAndCheckout(repoUrl_1) { @@ -79,7 +79,7 @@ function cloneAndCheckout(repoUrl_1) { } // Cleanup previously cloned files from development-standards repo var cleanupOldFiles = function () { - var excludeFiles = ['intro.md']; + var excludeFiles = ['intro.md', 'projects']; fs.readdirSync(localDir).forEach(function (file) { if (!excludeFiles.includes(file)) { var filePath = path.join(localDir, file); diff --git a/scripts/import.ts b/scripts/import.ts index a7c87bb..5b475fc 100644 --- a/scripts/import.ts +++ b/scripts/import.ts @@ -2,7 +2,7 @@ import { simpleGit, SimpleGit, CleanOptions } from 'simple-git'; import * as fs from 'fs'; import * as path from 'path'; -const remoteUrl = 'https://github.com/Amsterdam/development-standards'; +const remoteUrl = 'git@github.com:Amsterdam/development-standards.git'; const localDir = 'docs'; const cloneDir = path.join(localDir, 'latest'); @@ -27,7 +27,7 @@ async function cloneAndCheckout(repoUrl: string, branchName = 'main'): Promise { - const excludeFiles = ['intro.md']; + const excludeFiles = ['intro.md', 'projects']; fs.readdirSync(localDir).forEach((file) => { if (!excludeFiles.includes(file)) { diff --git a/sidebars.ts b/sidebars.ts index 066a929..e6e4d07 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -38,6 +38,11 @@ const sidebars: SidebarsConfig = { 'frontend/third-party-dependencies', ], }, + { + type: 'category', + label: 'Projects', + items: ['projects/maps'], + }, ], // By default, Docusaurus generates a sidebar from the docs folder structure // tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],