docs: use correct hrefs for all link elements

This commit is contained in:
Joakim Carlstein 2023-12-18 16:36:05 +01:00
parent 58316ba6f8
commit bdf831b008

View file

@ -3,10 +3,12 @@ import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight'; import starlight from '@astrojs/starlight';
import tailwind from '@astrojs/tailwind'; import tailwind from '@astrojs/tailwind';
const base = process.env.ASTRO_BASE || '';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: process.env.ASTRO_SITE, site: process.env.ASTRO_SITE,
base: process.env.ASTRO_BASE, base: base || undefined,
integrations: [ integrations: [
starlight({ starlight({
title: 'Emigrate', title: 'Emigrate',
@ -18,7 +20,7 @@ export default defineConfig({
attrs: { attrs: {
rel: 'apple-touch-icon', rel: 'apple-touch-icon',
type: 'image/png', type: 'image/png',
href: '/apple-touch-icon.png', href: `${base}/apple-touch-icon.png`,
sizes: '180x180', sizes: '180x180',
}, },
}, },
@ -27,7 +29,7 @@ export default defineConfig({
attrs: { attrs: {
rel: 'icon', rel: 'icon',
type: 'image/png', type: 'image/png',
href: '/favicon-32x32.png', href: `${base}/favicon-32x32.png`,
sizes: '32x32', sizes: '32x32',
}, },
}, },
@ -36,7 +38,7 @@ export default defineConfig({
attrs: { attrs: {
rel: 'icon', rel: 'icon',
type: 'image/png', type: 'image/png',
href: '/favicon-16x16.png', href: `${base}/favicon-16x16.png`,
sizes: '16x16', sizes: '16x16',
}, },
}, },
@ -44,7 +46,7 @@ export default defineConfig({
tag: 'link', tag: 'link',
attrs: { attrs: {
rel: 'manifest', rel: 'manifest',
href: '/site.webmanifest', href: `${base}/site.webmanifest`,
}, },
}, },
], ],