@fy-/fws-vue 0.0.905 → 0.0.907

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/seo.ts +6 -3
  3. package/ssr.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "0.0.905",
3
+ "version": "0.0.907",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {
package/seo.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  import type { Ref } from "vue";
3
3
  import { useFyHead } from "@fy-/head";
4
4
  import { computed } from "vue";
5
- import { getURL, getLocale } from "@fy-/fws-js";
5
+ import { getURL, getLocale, getPrefix } from "@fy-/fws-js";
6
6
 
7
7
  export interface LazyHead {
8
8
  name?: string;
@@ -38,7 +38,7 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
38
38
 
39
39
  links.push({
40
40
  rel: "canonical",
41
- href: seo.value.canonical || currentUrl,
41
+ href: currentUrl,
42
42
  key: "canonical",
43
43
  });
44
44
 
@@ -57,7 +57,10 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
57
57
  links.push({
58
58
  rel: "alternate",
59
59
  hreflang: locale,
60
- href: `${currentUrl}/l/${locale}${getURL().Path}`,
60
+ href: `${currentUrl}/l/${locale}${getURL().Path.replace(
61
+ getPrefix(),
62
+ "",
63
+ )}`,
61
64
  key: `alternate-${locale}`,
62
65
  });
63
66
  }
package/ssr.ts CHANGED
@@ -90,7 +90,7 @@ export async function initVueServer(
90
90
  result.statusCode = 500;
91
91
  const err =
92
92
  error instanceof Error ? `${error.message}\n${error.stack}` : error;
93
- const errorResult = `<div id="app"><h1>500 Internal Server Error</h1><pre>${err}</pre></div>`;
93
+ result.app = `<pre>${err}</pre>`;
94
94
  callback(result);
95
95
  return result;
96
96
  }