diff --git a/docs/installation.md b/docs/installation.md index 12e87a5e..158eabf8 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -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: diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/installation.md b/i18n/fr/docusaurus-plugin-content-docs/current/installation.md index f07b5b30..0d655dab 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/installation.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/installation.md @@ -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 :