From bdf831b008659687bed3ebefcc26e25b4be5b83a Mon Sep 17 00:00:00 2001 From: Joakim Carlstein Date: Mon, 18 Dec 2023 16:36:05 +0100 Subject: [PATCH] docs: use correct hrefs for all link elements --- docs/astro.config.mjs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index 4738a14..e60204a 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -3,10 +3,12 @@ import { defineConfig } from 'astro/config'; import starlight from '@astrojs/starlight'; import tailwind from '@astrojs/tailwind'; +const base = process.env.ASTRO_BASE || ''; + // https://astro.build/config export default defineConfig({ site: process.env.ASTRO_SITE, - base: process.env.ASTRO_BASE, + base: base || undefined, integrations: [ starlight({ title: 'Emigrate', @@ -18,7 +20,7 @@ export default defineConfig({ attrs: { rel: 'apple-touch-icon', type: 'image/png', - href: '/apple-touch-icon.png', + href: `${base}/apple-touch-icon.png`, sizes: '180x180', }, }, @@ -27,7 +29,7 @@ export default defineConfig({ attrs: { rel: 'icon', type: 'image/png', - href: '/favicon-32x32.png', + href: `${base}/favicon-32x32.png`, sizes: '32x32', }, }, @@ -36,7 +38,7 @@ export default defineConfig({ attrs: { rel: 'icon', type: 'image/png', - href: '/favicon-16x16.png', + href: `${base}/favicon-16x16.png`, sizes: '16x16', }, }, @@ -44,7 +46,7 @@ export default defineConfig({ tag: 'link', attrs: { rel: 'manifest', - href: '/site.webmanifest', + href: `${base}/site.webmanifest`, }, }, ],