@devite/nuxt-sanity 2.12.2 → 2.14.0
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.
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { defineNuxtModule, createResolver, addPlugin, addServerHandler, addImpor
|
|
|
3
3
|
import defu from 'defu';
|
|
4
4
|
|
|
5
5
|
const name = "@devite/nuxt-sanity";
|
|
6
|
-
const version = "2.
|
|
6
|
+
const version = "2.14.0";
|
|
7
7
|
|
|
8
8
|
const CONFIG_KEY = "sanity";
|
|
9
9
|
const module = defineNuxtModule({
|
|
@@ -33,6 +33,8 @@ export const useSanitySEO = (url, seo) => {
|
|
|
33
33
|
twitterDescription: () => seo.value?.description,
|
|
34
34
|
// OpenGraph site name
|
|
35
35
|
ogSiteName: () => globalSEO.value?.siteName,
|
|
36
|
+
// OpenGraph type
|
|
37
|
+
ogType: "website",
|
|
36
38
|
// OpenGraph Image
|
|
37
39
|
ogImage: () => imageUrl.value,
|
|
38
40
|
ogImageWidth: () => imageDimensions.value?.width,
|
|
@@ -5,7 +5,8 @@ export function getImage(src, { modifiers = {}, projectId, dataset, cacheEndpoin
|
|
|
5
5
|
if (cacheEndpoint && !(import.meta.client && useSanityVisualEditingState().enabled)) {
|
|
6
6
|
const params = new URLSearchParams();
|
|
7
7
|
params.set("src", src);
|
|
8
|
-
|
|
8
|
+
if (modifiers.format || !src.endsWith("-svg"))
|
|
9
|
+
params.set("modifiers", JSON.stringify(modifiers));
|
|
9
10
|
return { url: cacheEndpoint + `?${params.toString()}` };
|
|
10
11
|
}
|
|
11
12
|
return getSanityImage(src, { modifiers, projectId, dataset }, context);
|