From e4192f3d4f4a88c75ae6782ba6d1d7d75f01978f Mon Sep 17 00:00:00 2001 From: gman Date: Thu, 6 Feb 2025 01:45:28 +0300 Subject: [PATCH] add goatcounter --- astro.config.mjs | 49 ++++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 5a9f84d..beb14ce 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -9,23 +9,36 @@ export default defineConfig({ redirects: { '/': '/chapters', }, - integrations: [starlight({ - title: 'Веб-картография', - description: 'Веб-картография и веб-картографирование: практическое пособие', - locales: { - root: { - label: 'Русский', - lang: 'ru', + integrations: [ + starlight({ + title: 'Веб-картография', + description: 'Веб-картография и веб-картографирование: практическое пособие', + head: [ + { + tag: 'script', + attrs: { + src: "//gc.zgo.at/count.js", + 'data-goatcounter': "https://webkartography.goatcounter.com/count", + async: true + } + } + ], + locales: { + root: { + label: 'Русский', + lang: 'ru', + } + }, + sidebar: [ + { + label: 'Введение в веб-картографию', + autogenerate: { directory: 'chapters' }, + } + ], + components: { + SocialIcons: './src/components/CustomSocialIcons.astro', } - }, - sidebar: [ - { - label: 'Введение в веб-картографию', - autogenerate: { directory: 'chapters' }, - } - ], - components: { - SocialIcons: './src/components/CustomSocialIcons.astro', - } - }), react()], + }), + react() + ], }); \ No newline at end of file