Skip to content

Commit f39c336

Browse files
committed
progress commit - finished dev
1 parent 84b85c0 commit f39c336

24 files changed

+1306
-1106
lines changed

.nuxtrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
imports.autoImport=false
2+
typescript.includeWorkspace=true

.playground/app.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div>
3-
<div>
3+
<main>
44
<NuxtPage />
5-
</div>
5+
</main>
66
</div>
77
</template>

.playground/nuxt.config.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default defineNuxtConfig({
66
NuxtSimpleSitemap,
77
],
88
nitro: {
9+
plugins: ['plugins/sitemap.ts'],
910
prerender: {
1011
crawlLinks: true,
1112
routes: [
@@ -20,13 +21,13 @@ export default defineNuxtConfig({
2021
},
2122
sitemap: {
2223
sitemaps: {
23-
'posts': {
24+
posts: {
2425
include: ['/blog/**']
2526
},
26-
'pages': {
27+
pages: {
2728
exclude: ['/blog/**']
2829
}
29-
},
30+
}
3031
},
3132
routeRules: {
3233
'/secret': {

.playground/package.json

+9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
22
"private": true,
3+
"name": "nuxt-simple-sitemap-playground",
34
"packageManager": "[email protected]",
45
"dependencies": {
56
"nuxt-simple-sitemap": "link:../"
67
},
8+
"type": "module",
9+
"main": "./nuxt.config.ts",
10+
"files": [
11+
"pages",
12+
"server",
13+
"app.vue",
14+
"nuxt.config.ts"
15+
],
716
"scripts": {
817
"prepare": "nuxi prepare"
918
}

.playground/pages/about.vue

+1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ definePageMeta({
88
<template>
99
<div>
1010
About page
11+
<img src="https://res.cloudinary.com/dl6o1xpyq/image/upload/f_jpg,q_auto:best,dpr_auto,w_240,h_240/images/harlan-wilton" alt="Harlan Wilton">
1112
</div>
1213
</template>

.playground/public/robots.txt

-1
This file was deleted.

.playground/public/sitemap.xsl

-165
This file was deleted.

.playground/server/plugins/sitemap.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineNitroPlugin } from 'nitropack/runtime/plugin'
2+
3+
export default defineNitroPlugin((nitroApp) => {
4+
nitroApp.hooks.hook('sitemap:ssr', async (ctx) => {
5+
console.log('Sitemap SSR', ctx)
6+
})
7+
})

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
<p align="center">
13-
A simple sitemap.xml module for Nuxt 3.
13+
The simplest way to add XML Sitemaps to your Nuxt 3 site.
1414
</p>
1515

1616
<p align="center">
@@ -34,6 +34,8 @@ A simple sitemap.xml module for Nuxt 3.
3434
- Dynamic runtime URL support
3535
- Multi-sitemap support
3636
- Automatic lastmod
37+
- Automatic image discovery (prerendering)
38+
- Automatic splitting of large sitemaps
3739
- 🪝 Minimal config, powerful API
3840
- 🔄 Route config using route rules
3941
- 🏞️ Handle trailing slashes

package.json

+6-8
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,25 @@
3535
"test": "vitest generate"
3636
},
3737
"dependencies": {
38-
"@nuxt/kit": "3.2.3",
38+
"@nuxt/kit": "3.3.1",
3939
"chalk": "^5.2.0",
4040
"defu": "^6.1.2",
4141
"escape-string-regexp": "^5.0.0",
4242
"knitwork": "^1.0.0",
43-
"next-sitemap": "^4.0.5",
4443
"pathe": "^1.1.0",
4544
"radix3": "^1.0.0",
46-
"sitemap": "^7.1.1",
4745
"ufo": "^1.1.1"
4846
},
4947
"devDependencies": {
5048
"@antfu/eslint-config": "^0.36.0",
51-
"@nuxt/kit": "3.0.0",
49+
"@nuxt/kit": "^3.3.1",
5250
"@nuxt/module-builder": "^0.2.1",
53-
"@nuxt/test-utils": "3.2.3",
51+
"@nuxt/test-utils": "3.3.1",
5452
"@nuxtjs/eslint-config-typescript": "^12.0.0",
5553
"bumpp": "^9.0.0",
56-
"eslint": "8.35.0",
57-
"execa": "^7.0.0",
58-
"nuxt": "^3.2.3",
54+
"eslint": "8.36.0",
55+
"execa": "^7.1.1",
56+
"nuxt": "^3.3.1",
5957
"vitest": "^0.29.2"
6058
}
6159
}

0 commit comments

Comments
 (0)