some fixes to seo stuff

This commit is contained in:
MiniDigger 2022-03-27 11:52:11 +02:00
parent 987a46ed60
commit dea07cce8b
2 changed files with 8 additions and 8 deletions

View File

@ -66,11 +66,11 @@ export function useSeo(
script: [
{
type: "application/ld+json",
json: {
children: JSON.stringify({
"@context": "https://schema.org",
"@type": "BreadcrumbList",
itemListElement: generateBreadcrumbs(route),
},
}),
},
] as any[],
} as HeadObject;
@ -115,5 +115,5 @@ function guessTitle(segment: string): string {
}
function baseUrl(): string {
return import.meta.env.BASE_URL;
return import.meta.env.HANGAR_PUBLIC_HOST;
}

View File

@ -50,19 +50,19 @@ const filters = ref({
const projects = await useProjects().catch((e) => handleRequestError(e, ctx, i18n));
const meta = useSeo("Linkout", null, route, null);
const meta = useSeo("Home", null, route, null);
const script = {
type: "application/ld+json",
json: {
children: JSON.stringify({
"@context": "https://schema.org",
"@type": "WebSite",
url: import.meta.env.BASE_URL,
url: import.meta.env.HANGAR_PUBLIC_HOST,
potentialAction: {
"@type": "SearchAction",
target: import.meta.env.BASE_URL + "/?q={search_term_string}", // todo fix once search actually works
target: import.meta.env.HANGAR_PUBLIC_HOST + "/?q={search_term_string}", // todo fix once search actually works
"query-input": "required name=search_term_string",
},
},
}),
};
if (isRef(meta.script)) {
meta.script.value.push(script);