fix: set correct base site url

This commit is contained in:
kolaente 2024-07-01 21:45:35 +02:00
parent de4a42dc70
commit 4e9f00ea51
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 5 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import node from '@astrojs/node'
// https://astro.build/config
export default defineConfig({
site: 'https://vikunja.io',
output: 'hybrid',
integrations: [tailwind(), markdoc()],
adapter: node({

View File

@ -24,9 +24,10 @@ const imageUrl = image
? image
: new URL('/images/vikunja.jpg', Astro.url)
const canonical = Astro.url.toString().endsWith('/')
? Astro.url.toString().substring(0, Astro.url.toString().length - 1)
: Astro.url.toString()
const base = (new URL(Astro.url.pathname, Astro.site)).toString()
const canonical = base.endsWith('/')
? base.substring(0, Astro.url.toString().length - 1)
: base
---
<!doctype html>