From b46d97b257457328617aa61cc701c181c7520c53 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Fri, 18 Sep 2020 11:31:20 +0200 Subject: [PATCH] docs: add thesemetrics --- docs/.vitepress/config.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 51a192f2..35ad90e9 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -1,4 +1,19 @@ -/** @type {import('vitepress').UserConfig} */ +/** @typedef {import('vitepress').UserConfig} UserConfig */ + +/** @type {UserConfig['head']} */ +const head = [] + +if (process.env.NODE_ENV === 'production') { + head.push([ + 'script', + { + src: 'https://unpkg.com/thesemetrics@latest', + async: '', + }, + ]) +} + +/** @type {UserConfig} */ const config = { lang: 'en-US', title: 'Vue Router', @@ -15,6 +30,7 @@ const config = { description: 'El router oficial par Vue.js', }, }, + head, // serviceWorker: true, themeConfig: { // algolia: { -- 2.47.3