Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CDN Installation option #145

Merged
merged 1 commit into from
Aug 1, 2024
Merged
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
26 changes: 25 additions & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,31 @@ title: Installation

## Install the `<mapml-viewer>` suite of custom elements

### Requirements
### CDN

To include the `<mapml-viewer>` suite of elements on your page, you can add one of the following [Content Delivery Network](https://en.wikipedia.org/wiki/Content_delivery_network) to the `<head>` of your HTML code:

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="jsDelivr" label="jsDelivr">

```html
<script type="module" src="https://cdn.jsdelivr.net/npm/@maps4html/web-map-custom-element/dist/mapml-viewer.js"></script>
```

</TabItem>
<TabItem value="unpkg" label="unpkg">

```html
<script type="module" src="https://unpkg.com/@maps4html/web-map-custom-element/dist/mapml-viewer.js"></script>
```

</TabItem>
</Tabs>

### Node.js / NPM

To install the `<mapml-viewer>` in your web site project, you use the Node Package Manager (npm), so to get that you must install [node.js](https://nodejs.org/en/download/). npm should be installed by the linked installers. You can now obtain the latest version of the `<mapml-viewer>` suite of custom elements, by installing it in the node_modules directory of your web site directory, using the following commands:

Expand Down
26 changes: 25 additions & 1 deletion i18n/fr/docusaurus-plugin-content-docs/current/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,31 @@ title: Installation

## Installer les éléments personnalisés `<mapml-viewer>`.

### Exigences
### CDN

Pour inclure la suite d'éléments `<mapml-viewer>` dans votre page, vous pouvez ajouter l'un des [Content Delivery Network](https://fr.wikipedia.org/wiki/R%C3%A9seau_de_diffusion_de_contenu) suivants au `<head>` de votre code HTML :

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="jsDelivr" label="jsDelivr">

```html
<script type="module" src="https://cdn.jsdelivr.net/npm/@maps4html/web-map-custom-element/dist/mapml-viewer.js"></script>
```

</TabItem>
<TabItem value="unpkg" label="unpkg">

```html
<script type="module" src="https://unpkg.com/@maps4html/web-map-custom-element/dist/mapml-viewer.js"></script>
```

</TabItem>
</Tabs>

### Node.js / NPM

Pour installer les éléments `<mapml-viewer>` dans votre projet de site Web, vous devez utiliser Node Package Manager (npm). Pour ce faire, vous devez installer [node.js](https://nodejs.org/en/download/). Le gestionnaire npm devrait être installé par les installateurs liés. Vous pouvez maintenant obtenir la version la plus récente des éléments personnalisés `<mapml-viewer>`, en les installant dans le répertoire node_modules du répertoire de votre site Web à l’aide des commandes suivantes :

Expand Down
Loading