@nuxtjs/seo 2.0.0-rc.1 → 2.0.0-rc.10
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/README.md +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +33 -20
- package/dist/runtime/nitro/middleware/redirect.mjs +4 -5
- package/dist/runtime/nuxt/composables/useBreadcrumbItems.d.ts +44 -6
- package/dist/runtime/nuxt/composables/useBreadcrumbItems.mjs +29 -8
- package/dist/runtime/nuxt/logic/applyDefaults.d.ts +1 -0
- package/dist/runtime/nuxt/logic/applyDefaults.mjs +46 -0
- package/dist/runtime/nuxt/plugin/defaults.mjs +6 -44
- package/dist/runtime/nuxt/plugin/defaultsWaitI18n.server.d.ts +2 -0
- package/dist/runtime/nuxt/plugin/defaultsWaitI18n.server.mjs +14 -0
- package/dist/runtime/nuxt/plugin/titles.mjs +3 -0
- package/package.json +45 -28
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ The complete SEO solution for Nuxt.
|
|
|
17
17
|
<tbody>
|
|
18
18
|
<td align="center">
|
|
19
19
|
<img width="800" height="0" /><br>
|
|
20
|
-
<i>Status:</i> <a href="https://github.com/harlan-zw/nuxt-seo/releases/tag/v2.0.0">v2
|
|
20
|
+
<i>Status:</i> <a href="https://github.com/harlan-zw/nuxt-seo/releases/tag/v2.0.0">v2 RC is available</a></b> <br>
|
|
21
21
|
<sup> Please report any issues 🐛</sup><br>
|
|
22
22
|
<sub>Made possible by my <a href="https://github.com/sponsors/harlan-zw">Sponsor Program 💖</a><br> Follow me <a href="https://twitter.com/harlan_zw">@harlan_zw</a> 🐦 • Join <a href="https://discord.gg/275MBUBvgP">Discord</a> for help</sub><br>
|
|
23
23
|
<img width="800" height="0" />
|
|
@@ -38,7 +38,7 @@ With powerful APIs built for fully dynamic sites and zero-config defaults for st
|
|
|
38
38
|
|
|
39
39
|
## Modules
|
|
40
40
|
|
|
41
|
-
- 📖 [
|
|
41
|
+
- 📖 [@nuxtjs/sitemap](https://github.com/nuxt-modules/sitemap) - Sitemap.xml Support
|
|
42
42
|
- 🤖 [nuxt-simple-robots](https://github.com/harlan-zw/nuxt-simple-robots) - Manage site crawling
|
|
43
43
|
- 🔎 [nuxt-schema-org](https://unhead-schema-org.harlanzw.com/) - Generate Schema.org JSON-LD for SEO
|
|
44
44
|
- △ [nuxt-seo-experiments](https://github.com/harlan-zw/nuxt-seo-experiments) - Experimental SEO meta features
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineNuxtModule,
|
|
2
|
-
import
|
|
1
|
+
import { defineNuxtModule, createResolver, useLogger, installModule, hasNuxtModule, addPlugin, addImports, addServerHandler } from '@nuxt/kit';
|
|
2
|
+
import { colors } from 'consola/utils';
|
|
3
3
|
import { installNuxtSiteConfig } from 'nuxt-site-config-kit';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { readPackageJSON } from 'pkg-types';
|
|
5
|
+
import { $fetch } from 'ofetch';
|
|
6
6
|
|
|
7
7
|
const Modules = [
|
|
8
8
|
"nuxt-simple-robots",
|
|
9
|
-
"
|
|
9
|
+
"@nuxtjs/sitemap",
|
|
10
10
|
"nuxt-og-image",
|
|
11
11
|
"nuxt-schema-org",
|
|
12
12
|
"nuxt-seo-experiments",
|
|
@@ -32,20 +32,32 @@ const module = defineNuxtModule({
|
|
|
32
32
|
};
|
|
33
33
|
},
|
|
34
34
|
async setup(config, nuxt) {
|
|
35
|
-
const
|
|
35
|
+
const { resolve, resolvePath } = createResolver(import.meta.url);
|
|
36
|
+
const { name, version } = await readPackageJSON(resolve("../package.json"));
|
|
37
|
+
const logger = useLogger(name);
|
|
36
38
|
logger.level = config.debug ? 4 : 3;
|
|
37
39
|
if (config.enabled === false) {
|
|
38
40
|
logger.debug("The module is disabled, skipping setup.");
|
|
39
41
|
return;
|
|
40
42
|
}
|
|
41
|
-
const { resolve, resolvePath } = createResolver(import.meta.url);
|
|
42
43
|
await installNuxtSiteConfig();
|
|
43
44
|
for (const module of Modules)
|
|
44
45
|
await installModule(await resolvePath(module));
|
|
45
46
|
if (config.automaticDefaults) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
if (hasNuxtModule("@nuxtjs/i18n")) {
|
|
48
|
+
addPlugin({
|
|
49
|
+
src: resolve(`./runtime/nuxt/plugin/defaultsWaitI18n.server`),
|
|
50
|
+
mode: "server"
|
|
51
|
+
});
|
|
52
|
+
addPlugin({
|
|
53
|
+
src: resolve(`./runtime/nuxt/plugin/defaults`),
|
|
54
|
+
mode: "client"
|
|
55
|
+
});
|
|
56
|
+
} else {
|
|
57
|
+
addPlugin({
|
|
58
|
+
src: resolve(`./runtime/nuxt/plugin/defaults`)
|
|
59
|
+
});
|
|
60
|
+
}
|
|
49
61
|
}
|
|
50
62
|
if (config.fallbackTitle) {
|
|
51
63
|
addPlugin({
|
|
@@ -67,10 +79,10 @@ const module = defineNuxtModule({
|
|
|
67
79
|
};
|
|
68
80
|
for (const [module, composables] of Object.entries(polyfills)) {
|
|
69
81
|
if (nuxt.options[module]?.enable === false) {
|
|
70
|
-
composables.forEach((
|
|
82
|
+
composables.forEach((name2) => {
|
|
71
83
|
addImports({
|
|
72
84
|
from: resolve("./runtime/nuxt/composables/polyfills"),
|
|
73
|
-
name
|
|
85
|
+
name: name2
|
|
74
86
|
});
|
|
75
87
|
});
|
|
76
88
|
}
|
|
@@ -82,18 +94,19 @@ const module = defineNuxtModule({
|
|
|
82
94
|
middleware: true
|
|
83
95
|
});
|
|
84
96
|
}
|
|
85
|
-
if (config.splash) {
|
|
97
|
+
if (config.splash && !version.includes("rc") && nuxt.options.dev) {
|
|
86
98
|
logger.log("");
|
|
87
99
|
let latestTag = `v${version}`;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
100
|
+
latestTag = (await $fetch("https://ungh.unjs.io/repos/harlan-zw/nuxt-seo/releases/latest", {
|
|
101
|
+
timeout: 2e3
|
|
102
|
+
}).catch(() => {
|
|
103
|
+
return { release: { tag: `v${version}` } };
|
|
104
|
+
})).release.tag;
|
|
92
105
|
const upToDate = latestTag === `v${version}`;
|
|
93
|
-
logger.log(`${
|
|
106
|
+
logger.log(`${colors.green("Nuxt SEO")} ${colors.yellow(`v${version}`)} ${colors.gray(`by ${colors.underline("@harlan_zw")}`)}`);
|
|
94
107
|
if (!upToDate)
|
|
95
|
-
logger.log(`${
|
|
96
|
-
logger.log(
|
|
108
|
+
logger.log(`${colors.gray(" \u251C\u2500 ")}\u{1F389} New version available!${colors.gray(` Run ${colors.underline(`npm i @nuxtjs/seo@${latestTag}`)} to update.`)}`);
|
|
109
|
+
logger.log(colors.dim(" \u2514\u2500 \u{1F9EA} Help get Nuxt SEO stable by providing feedback https://github.com/harlan-zw/nuxt-seo/discussions/108"));
|
|
97
110
|
logger.log("");
|
|
98
111
|
}
|
|
99
112
|
}
|
|
@@ -4,11 +4,10 @@ import { useNitroOrigin, useSiteConfig } from "#imports";
|
|
|
4
4
|
export default defineEventHandler((e) => {
|
|
5
5
|
const siteConfig = useSiteConfig(e);
|
|
6
6
|
if (siteConfig.site) {
|
|
7
|
+
const siteConfigHostName = new URL(e.path, siteConfig.site).hostname;
|
|
7
8
|
const origin = useNitroOrigin(e);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return sendRedirect(e, joinURL(siteConfig.site, url.pathname), 301);
|
|
12
|
-
}
|
|
9
|
+
const originHostname = new URL(e.path, origin).hostname;
|
|
10
|
+
if (originHostname !== siteConfigHostName)
|
|
11
|
+
return sendRedirect(e, joinURL(siteConfig.site, e.path), 301);
|
|
13
12
|
}
|
|
14
13
|
});
|
|
@@ -1,8 +1,48 @@
|
|
|
1
1
|
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NuxtLinkProps } from 'nuxt/app';
|
|
3
|
+
interface NuxtUIBreadcrumbItem extends NuxtLinkProps {
|
|
4
|
+
label: string;
|
|
5
|
+
labelClass?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
iconClass?: string;
|
|
8
|
+
as?: string;
|
|
9
|
+
type?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
active?: boolean;
|
|
12
|
+
exact?: boolean;
|
|
13
|
+
exactQuery?: boolean;
|
|
14
|
+
exactMatch?: boolean;
|
|
15
|
+
inactiveClass?: string;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
3
18
|
export interface BreadcrumbProps {
|
|
19
|
+
/**
|
|
20
|
+
* Generate the breadcrumbs based on a different path than the current route.
|
|
21
|
+
*/
|
|
4
22
|
path?: MaybeRefOrGetter<string>;
|
|
23
|
+
/**
|
|
24
|
+
* The id of the breadcrumb list. It's recommended to provide a unique
|
|
25
|
+
* id when adding multiple breadcrumb lists to the same page.
|
|
26
|
+
*/
|
|
5
27
|
id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Append additional breadcrumb items to the end of the list. This is applied
|
|
30
|
+
* after the `overrides` option.
|
|
31
|
+
*/
|
|
32
|
+
append?: BreadcrumbItemProps[];
|
|
33
|
+
/**
|
|
34
|
+
* Prepend additional breadcrumb items to the start of the list. This is applied
|
|
35
|
+
* after the `overrides` option.
|
|
36
|
+
*/
|
|
37
|
+
prepend?: BreadcrumbItemProps[];
|
|
38
|
+
/**
|
|
39
|
+
* Override any of the breadcrumb items based on the index.
|
|
40
|
+
*/
|
|
41
|
+
overrides?: (BreadcrumbItemProps | false | undefined)[];
|
|
42
|
+
/**
|
|
43
|
+
* Should the schema.org breadcrumb be generated.
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
6
46
|
schemaOrg?: boolean;
|
|
7
47
|
/**
|
|
8
48
|
* The Aria Label for the breadcrumbs.
|
|
@@ -22,7 +62,7 @@ export interface BreadcrumbProps {
|
|
|
22
62
|
*/
|
|
23
63
|
hideRoot?: MaybeRefOrGetter<boolean>;
|
|
24
64
|
}
|
|
25
|
-
export interface BreadcrumbItemProps extends
|
|
65
|
+
export interface BreadcrumbItemProps extends NuxtUIBreadcrumbItem {
|
|
26
66
|
/** Whether the breadcrumb item represents the aria-current. */
|
|
27
67
|
current?: boolean;
|
|
28
68
|
/**
|
|
@@ -30,12 +70,9 @@ export interface BreadcrumbItemProps extends BreadcrumbLink {
|
|
|
30
70
|
* @default 'page'
|
|
31
71
|
*/
|
|
32
72
|
ariaCurrent?: 'page' | 'step' | 'location' | 'date' | 'time' | boolean | 'true' | 'false';
|
|
33
|
-
|
|
34
|
-
disabled?: boolean;
|
|
35
|
-
to: string;
|
|
73
|
+
to?: string;
|
|
36
74
|
ariaLabel?: string;
|
|
37
75
|
separator?: boolean | string;
|
|
38
|
-
icon?: string;
|
|
39
76
|
class?: (string | string[] | undefined)[] | string;
|
|
40
77
|
/**
|
|
41
78
|
* @internal
|
|
@@ -46,3 +83,4 @@ export interface BreadcrumbItemProps extends BreadcrumbLink {
|
|
|
46
83
|
};
|
|
47
84
|
}
|
|
48
85
|
export declare function useBreadcrumbItems(options?: BreadcrumbProps): any;
|
|
86
|
+
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { withoutTrailingSlash } from "ufo";
|
|
2
|
+
import { defu } from "defu";
|
|
2
3
|
import { pathBreadcrumbSegments } from "../../pure/breadcrumbs.mjs";
|
|
3
4
|
import {
|
|
4
5
|
computed,
|
|
6
|
+
createSitePathResolver,
|
|
5
7
|
defineBreadcrumb,
|
|
6
8
|
toValue,
|
|
7
9
|
useI18n,
|
|
@@ -20,22 +22,40 @@ export function useBreadcrumbItems(options = {}) {
|
|
|
20
22
|
const router = useRouter();
|
|
21
23
|
const routes = router.getRoutes();
|
|
22
24
|
const i18n = useI18n();
|
|
25
|
+
const siteResolver = createSitePathResolver({
|
|
26
|
+
canonical: true,
|
|
27
|
+
absolute: true
|
|
28
|
+
});
|
|
23
29
|
const items = computed(() => {
|
|
24
30
|
let rootNode = "/";
|
|
25
31
|
if (i18n) {
|
|
26
|
-
if (i18n.strategy === "prefix" || i18n.strategy !== "no_prefix" && i18n.defaultLocale
|
|
27
|
-
rootNode = `/${i18n.
|
|
32
|
+
if (i18n.strategy === "prefix" || i18n.strategy !== "no_prefix" && toValue(i18n.defaultLocale) !== toValue(i18n.locale))
|
|
33
|
+
rootNode = `/${toValue(i18n.locale)}`;
|
|
28
34
|
}
|
|
29
35
|
const current = withoutQuery(withoutTrailingSlash(toValue(options.path || useRoute().path) || rootNode));
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
const overrides = options.overrides || [];
|
|
37
|
+
const segments = pathBreadcrumbSegments(current, rootNode).map((path, index) => {
|
|
38
|
+
let item = {
|
|
39
|
+
to: path
|
|
40
|
+
};
|
|
41
|
+
if (typeof overrides[index] !== "undefined") {
|
|
42
|
+
if (overrides[index] === false)
|
|
43
|
+
return false;
|
|
44
|
+
item = defu(overrides[index], item);
|
|
45
|
+
}
|
|
46
|
+
return item;
|
|
47
|
+
});
|
|
48
|
+
if (options.prepend)
|
|
49
|
+
segments.unshift(...options.prepend);
|
|
50
|
+
if (options.append)
|
|
51
|
+
segments.push(...options.append);
|
|
52
|
+
return segments.filter(Boolean).map((item) => {
|
|
33
53
|
const route = routes.find((r) => withoutTrailingSlash(r.path) === withoutTrailingSlash(item.to));
|
|
34
54
|
const routeMeta = route?.meta || {};
|
|
35
55
|
const routeName = route ? String(route.name || route.path) : item.to === "/" ? "index" : "unknown";
|
|
36
56
|
let [name] = routeName.split("___");
|
|
37
57
|
if (name === "unknown")
|
|
38
|
-
name = item.to.split("/").pop() || "";
|
|
58
|
+
name = (item.to || "").split("/").pop() || "";
|
|
39
59
|
if (routeMeta.breadcrumb) {
|
|
40
60
|
item = {
|
|
41
61
|
...item,
|
|
@@ -61,14 +81,15 @@ export function useBreadcrumbItems(options = {}) {
|
|
|
61
81
|
return m;
|
|
62
82
|
}).filter(Boolean);
|
|
63
83
|
});
|
|
64
|
-
|
|
84
|
+
const schemaOrgEnabled = typeof options.schemaOrg === "undefined" ? true : options.schemaOrg;
|
|
85
|
+
if (process.server && schemaOrgEnabled) {
|
|
65
86
|
useSchemaOrg([
|
|
66
87
|
defineBreadcrumb(computed(() => {
|
|
67
88
|
return {
|
|
68
89
|
id: `#${options.id || "breadcrumb"}`,
|
|
69
90
|
itemListElement: items.value.map((item) => ({
|
|
70
91
|
name: item.label || item.ariaLabel,
|
|
71
|
-
item: item.to
|
|
92
|
+
item: item.to ? siteResolver(item.to) : void 0
|
|
72
93
|
}))
|
|
73
94
|
};
|
|
74
95
|
}))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function applyDefaults(): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
createSitePathResolver,
|
|
4
|
+
useHead,
|
|
5
|
+
useRoute,
|
|
6
|
+
useSeoMeta,
|
|
7
|
+
useServerHead,
|
|
8
|
+
useSiteConfig
|
|
9
|
+
} from "#imports";
|
|
10
|
+
export function applyDefaults() {
|
|
11
|
+
const siteConfig = useSiteConfig();
|
|
12
|
+
const route = useRoute();
|
|
13
|
+
const resolveUrl = createSitePathResolver({ withBase: true, absolute: true });
|
|
14
|
+
const canonicalUrl = computed(() => resolveUrl(route.path || "/").value || route.path);
|
|
15
|
+
const minimalPriority = {
|
|
16
|
+
// give nuxt.config values higher priority
|
|
17
|
+
tagPriority: 101
|
|
18
|
+
};
|
|
19
|
+
useHead({
|
|
20
|
+
link: [{ rel: "canonical", href: () => canonicalUrl.value }]
|
|
21
|
+
});
|
|
22
|
+
const locale = siteConfig.currentLocale || siteConfig.defaultLocale;
|
|
23
|
+
if (locale) {
|
|
24
|
+
useServerHead({
|
|
25
|
+
htmlAttrs: { lang: locale }
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
useHead({
|
|
29
|
+
templateParams: { site: siteConfig, siteName: siteConfig.name || "" },
|
|
30
|
+
titleTemplate: "%s %separator %siteName"
|
|
31
|
+
}, minimalPriority);
|
|
32
|
+
const seoMeta = {
|
|
33
|
+
ogType: "website",
|
|
34
|
+
ogUrl: () => canonicalUrl.value,
|
|
35
|
+
ogLocale: locale,
|
|
36
|
+
ogSiteName: siteConfig.name
|
|
37
|
+
};
|
|
38
|
+
if (siteConfig.description)
|
|
39
|
+
seoMeta.description = siteConfig.description;
|
|
40
|
+
if (siteConfig.twitter) {
|
|
41
|
+
const id = siteConfig.twitter.startsWith("@") ? siteConfig.twitter : `@${siteConfig.twitter}`;
|
|
42
|
+
seoMeta.twitterCreator = id;
|
|
43
|
+
seoMeta.twitterSite = id;
|
|
44
|
+
}
|
|
45
|
+
useSeoMeta(seoMeta, minimalPriority);
|
|
46
|
+
}
|
|
@@ -1,49 +1,11 @@
|
|
|
1
|
+
import { applyDefaults as setup } from "../logic/applyDefaults.mjs";
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
-
createSitePathResolver,
|
|
4
|
-
defineNuxtPlugin,
|
|
5
|
-
useHead,
|
|
6
|
-
useRoute,
|
|
7
|
-
useSeoMeta,
|
|
8
|
-
useServerHead,
|
|
9
|
-
useSiteConfig
|
|
3
|
+
defineNuxtPlugin
|
|
10
4
|
} from "#imports";
|
|
11
5
|
export default defineNuxtPlugin({
|
|
12
6
|
name: "nuxt-seo:defaults",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const canonicalUrl = computed(() => resolveUrl(route.path || "/").value || route.path);
|
|
18
|
-
const minimalPriority = {
|
|
19
|
-
// give nuxt.config values higher priority
|
|
20
|
-
tagPriority: 101
|
|
21
|
-
};
|
|
22
|
-
useHead({
|
|
23
|
-
link: [{ rel: "canonical", href: () => canonicalUrl.value }]
|
|
24
|
-
});
|
|
25
|
-
const locale = siteConfig.currentLocale || siteConfig.defaultLocale;
|
|
26
|
-
if (locale) {
|
|
27
|
-
useServerHead({
|
|
28
|
-
htmlAttrs: { lang: locale }
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
useHead({
|
|
32
|
-
templateParams: { site: siteConfig, siteName: siteConfig.name || "" },
|
|
33
|
-
titleTemplate: "%s %separator %siteName"
|
|
34
|
-
}, minimalPriority);
|
|
35
|
-
const seoMeta = {
|
|
36
|
-
ogUrl: () => canonicalUrl.value,
|
|
37
|
-
ogLocale: locale,
|
|
38
|
-
ogSiteName: siteConfig.name
|
|
39
|
-
};
|
|
40
|
-
if (siteConfig.description)
|
|
41
|
-
seoMeta.description = siteConfig.description;
|
|
42
|
-
if (siteConfig.twitter) {
|
|
43
|
-
const id = siteConfig.twitter.startsWith("@") ? siteConfig.twitter : `@${siteConfig.twitter}`;
|
|
44
|
-
seoMeta.twitterCreator = id;
|
|
45
|
-
seoMeta.twitterSite = id;
|
|
46
|
-
}
|
|
47
|
-
useSeoMeta(seoMeta, minimalPriority);
|
|
48
|
-
}
|
|
7
|
+
env: {
|
|
8
|
+
islands: false
|
|
9
|
+
},
|
|
10
|
+
setup
|
|
49
11
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { applyDefaults as setup } from "../logic/applyDefaults.mjs";
|
|
2
|
+
import { defineNuxtPlugin } from "#imports";
|
|
3
|
+
export default defineNuxtPlugin({
|
|
4
|
+
name: "nuxt-seo:defaults",
|
|
5
|
+
env: {
|
|
6
|
+
islands: false
|
|
7
|
+
},
|
|
8
|
+
// we need to wait for the i18n plugin to run first
|
|
9
|
+
dependsOn: [
|
|
10
|
+
// @ts-expect-error dynamic
|
|
11
|
+
"nuxt-site-config:i18n"
|
|
12
|
+
],
|
|
13
|
+
setup
|
|
14
|
+
});
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxtjs/seo",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-rc.
|
|
5
|
-
"packageManager": "pnpm@8.
|
|
4
|
+
"version": "2.0.0-rc.10",
|
|
5
|
+
"packageManager": "pnpm@8.15.5",
|
|
6
6
|
"description": "The all-in-one SEO layer for Nuxt 3.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Harlan Wilton",
|
|
@@ -19,44 +19,61 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/harlan-zw/nuxt-seo/issues"
|
|
21
21
|
},
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/types.d.ts",
|
|
25
|
+
"import": "./dist/module.mjs",
|
|
26
|
+
"require": "./dist/module.cjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"main": "./dist/module.cjs",
|
|
30
|
+
"types": "./dist/types.d.ts",
|
|
22
31
|
"files": [
|
|
23
32
|
"dist"
|
|
24
33
|
],
|
|
25
34
|
"dependencies": {
|
|
26
|
-
"@nuxt/kit": "^3.
|
|
27
|
-
"
|
|
28
|
-
"defu": "^6.1.
|
|
29
|
-
"nuxt-link-checker": "^3.0.0-rc.
|
|
30
|
-
"nuxt-og-image": "^3.0.0-rc.
|
|
31
|
-
"nuxt-schema-org": "^3.3.
|
|
32
|
-
"nuxt-seo-experiments": "
|
|
33
|
-
"nuxt-simple-robots": "
|
|
34
|
-
"nuxt-
|
|
35
|
-
"nuxt-site-config": "^2.2.
|
|
36
|
-
"
|
|
37
|
-
"ufo": "^1.3
|
|
35
|
+
"@nuxt/kit": "^3.11.1",
|
|
36
|
+
"@nuxtjs/sitemap": "^5.1.2",
|
|
37
|
+
"defu": "^6.1.4",
|
|
38
|
+
"nuxt-link-checker": "^3.0.0-rc.7",
|
|
39
|
+
"nuxt-og-image": "^3.0.0-rc.47",
|
|
40
|
+
"nuxt-schema-org": "^3.3.6",
|
|
41
|
+
"nuxt-seo-experiments": "4.0.0-rc.5",
|
|
42
|
+
"nuxt-simple-robots": "4.0.0-rc.16",
|
|
43
|
+
"nuxt-site-config": "^2.2.11",
|
|
44
|
+
"nuxt-site-config-kit": "^2.2.11",
|
|
45
|
+
"pkg-types": "^1.0.3",
|
|
46
|
+
"ufo": "^1.5.3"
|
|
38
47
|
},
|
|
39
48
|
"devDependencies": {
|
|
40
|
-
"@antfu/eslint-config": "^2.
|
|
49
|
+
"@antfu/eslint-config": "^2.9.0",
|
|
41
50
|
"@nuxt/module-builder": "^0.5.5",
|
|
42
|
-
"@nuxt/schema": "^3.
|
|
43
|
-
"@nuxt/test-utils": "3.
|
|
44
|
-
"@nuxt/ui": "^2.
|
|
45
|
-
"@nuxtjs/i18n": "8.
|
|
46
|
-
"bumpp": "^9.
|
|
47
|
-
"eslint": "^8.
|
|
51
|
+
"@nuxt/schema": "^3.11.1",
|
|
52
|
+
"@nuxt/test-utils": "3.12.0",
|
|
53
|
+
"@nuxt/ui": "^2.14.2",
|
|
54
|
+
"@nuxtjs/i18n": "8.2.0",
|
|
55
|
+
"bumpp": "^9.4.0",
|
|
56
|
+
"eslint": "^8.57.0",
|
|
48
57
|
"execa": "^8.0.1",
|
|
49
|
-
"nitropack": "^2.
|
|
50
|
-
"nuxt": "^3.
|
|
51
|
-
"
|
|
52
|
-
"
|
|
58
|
+
"nitropack": "^2.9.4",
|
|
59
|
+
"nuxt": "^3.11.1",
|
|
60
|
+
"nuxt-icon": "^0.6.10",
|
|
61
|
+
"typescript": "^5.4.3",
|
|
62
|
+
"vitest": "^1.4.0"
|
|
63
|
+
},
|
|
64
|
+
"build": {
|
|
65
|
+
"externals": [
|
|
66
|
+
"ofetch",
|
|
67
|
+
"consola/utils"
|
|
68
|
+
]
|
|
53
69
|
},
|
|
54
70
|
"scripts": {
|
|
55
71
|
"build": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build",
|
|
56
72
|
"dev": "nuxi dev .playground",
|
|
73
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare .playground",
|
|
57
74
|
"lint": "eslint . --fix",
|
|
58
|
-
"release": "bumpp && pnpm -r publish --access public",
|
|
59
|
-
"test": "nuxi prepare .playground &&
|
|
60
|
-
"typecheck": "tsc --noEmit --strict"
|
|
75
|
+
"release": "pnpm build && bumpp && pnpm -r publish --access public",
|
|
76
|
+
"test": "nuxi prepare .playground && vitest",
|
|
77
|
+
"typecheck": "npx vue-tsc --noEmit --strict"
|
|
61
78
|
}
|
|
62
79
|
}
|