diff --git a/caddy/WebCaddyfile.internal b/caddy/WebCaddyfile.internal index b914d24b..544b600a 100644 --- a/caddy/WebCaddyfile.internal +++ b/caddy/WebCaddyfile.internal @@ -28,7 +28,7 @@ # Static SPA handle { root * /usr/share/caddy - try_files {path} /index.html + try_files {path} {path}/index.html /index.html file_server } diff --git a/index.html b/index.html index a082134c..d02da92d 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ - diff --git a/src/support/seo.ts b/src/support/seo.ts index d93dcbd0..b0568645 100644 --- a/src/support/seo.ts +++ b/src/support/seo.ts @@ -1,8 +1,9 @@ import { computed, onBeforeUnmount, unref, watchEffect, type MaybeRefOrGetter } from 'vue'; import type { PostResponse } from '@api/response/posts-response.ts'; -export const DEFAULT_SITE_URL = 'https://oullin.io'; export const SITE_NAME = 'Gustavo Ocanto'; +export const DEFAULT_SITE_URL = 'https://oullin.io'; +export const ABOUT_IMAGE = '/images/profile/about.jpg'; export const SITE_URL = (import.meta.env?.VITE_SITE_URL as string | undefined) ?? (typeof window !== 'undefined' ? window.location.origin : DEFAULT_SITE_URL); type TwitterCard = 'summary' | 'summary_large_image' | 'app' | 'player'; @@ -42,7 +43,7 @@ export class Seo { if (!hasDocument || !hasWindow) return; const currentPath = window.location.pathname + window.location.search; - const url = options.url ?? new URL(currentPath, SITE_URL).toString(); + const url = options.url ?? siteUrlFor(currentPath || '/'); const image = options.image ? new URL(options.image, SITE_URL).toString() : undefined; const title = options.title ? `${options.title} - ${SITE_NAME}` : SITE_NAME; const description = options.description; @@ -191,7 +192,7 @@ export function useSeoFromPost(post: MaybeRefOrGetter