mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-01-24 14:24:47 +08:00
some fixes to seo stuff
This commit is contained in:
parent
987a46ed60
commit
dea07cce8b
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user