Skip to content

Commit

Permalink
feat: Nuxt Sitemap v5
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Jan 6, 2024
1 parent 51ad6c6 commit b1e4374
Show file tree
Hide file tree
Showing 18 changed files with 243 additions and 114 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ With powerful APIs built for fully dynamic sites and zero-config defaults for st

## Modules

- 📖 [nuxt-simple-sitemap](https://github.com/nuxt-modules/sitemap) - Sitemap.xml Support
- 📖 [@nuxtjs/sitemap](https://github.com/nuxt-modules/sitemap) - Sitemap.xml Support
- 🤖 [nuxt-simple-robots](https://github.com/harlan-zw/nuxt-simple-robots) - Manage site crawling
- 🔎 [nuxt-schema-org](https://unhead-schema-org.harlanzw.com/) - Generate Schema.org JSON-LD for SEO
-[nuxt-seo-experiments](https://github.com/harlan-zw/nuxt-seo-experiments) - Experimental SEO meta features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ navigation:
Nuxt SEO is both a collection of modules and a module itself. The Nuxt SEO module is all the SEO modules combined into one that is guaranteed to work well together.

- [Nuxt Simple Robots](/robots)
- [Nuxt Simple Sitemap](/sitemap)
- [Nuxt Sitemap](/sitemap)
- [Nuxt OG Image](/og-image)
- [Nuxt Schema.org](/schema-org)
- [Nuxt SEO Experiments](/experiments)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Upgraded from v1 to v3:

No breaking changes.

### Nuxt Simple Sitemap
### Nuxt Sitemap

Upgraded from v1 to v3:
- [v2 release notes](https://github.com/nuxt-modules/sitemap/releases/tag/v2.0.0)
Expand Down
2 changes: 1 addition & 1 deletion docs/content/0.nuxt-seo/2.guides/0.disabling-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Since Nuxt SEO installs and enables modules for you, you may run into a situatio

The following modules are installed for you by default:
- `nuxt-og-image` - `ogImage`
- `nuxt-simple-sitemap` - `sitemap`
- `@nuxtjs/sitemap` - `sitemap`
- `nuxt-simple-robots` - `robots`
- `nuxt-seo-experiments` - `seoExperiments`
- `nuxt-schema-org` - `schemaOrg`
Expand Down
2 changes: 1 addition & 1 deletion docs/content/10.site-config/1.integrations/0.i18n.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Nuxt I18n
description: How to use the Nuxt Simple Sitemap module with Nuxt I18n.
description: How to use the Nuxt Sitemap module with Nuxt I18n.
---

Out of the box, the Site Config module will integrate directly with [@nuxtjs/i18n v8](https://v8.i18n.nuxtjs.org/).
Expand Down
16 changes: 8 additions & 8 deletions docs/content/2.sitemap/0.getting-started/1.installation.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
title: 'Install Nuxt Simple Sitemap'
description: 'Get started with Nuxt Simple Sitemap by installing the dependency to your project.'
title: 'Install Nuxt Sitemap'
description: 'Get started with Nuxt Sitemap by installing the dependency to your project.'
navigation:
title: 'Installation'
---

1. Install `nuxt-simple-sitemap` dependency to your project:
1. Install `@nuxtjs/sitemap` dependency to your project:

::code-group

```sh [pnpm]
pnpm i -D nuxt-simple-sitemap
pnpm i -D @nuxtjs/sitemap
```

```bash [yarn]
yarn add -D nuxt-simple-sitemap
yarn add -D @nuxtjs/sitemap
```

```bash [npm]
npm install -D nuxt-simple-sitemap
npm install -D @nuxtjs/sitemap
```

::
Expand All @@ -27,7 +27,7 @@ npm install -D nuxt-simple-sitemap

```ts [nuxt.config.ts]
export default defineNuxtConfig({
modules: ['nuxt-simple-sitemap']
modules: ['@nuxtjs/sitemap']
})
```

Expand All @@ -50,7 +50,7 @@ Otherwise, you can use an `.env` file or environment variables.
NUXT_PUBLIC_SITE_URL=https://example.com
```

Nuxt Simple Sitemap is powered by [Nuxt Site Config](/site-config/getting-started/background), to learn more head over to the [Nuxt Site Config docs](/site-config/getting-started/how-it-works).
Nuxt Sitemap is powered by [Nuxt Site Config](/site-config/getting-started/background), to learn more head over to the [Nuxt Site Config docs](/site-config/getting-started/how-it-works).

4. Preview your Sitemap

Expand Down
2 changes: 1 addition & 1 deletion docs/content/2.sitemap/0.getting-started/2.data-sources.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Data Sources
description: Learn how the Nuxt Simple Sitemap sources work.
description: Learn how the Nuxt Sitemap sources work.
---

Every URL within your sitemap will belong to a source.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/2.sitemap/0.getting-started/3.stackblitz.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Stackblitz
description: StackBlitz playgrounds you can use to experiment with the module or make reproductions.
---

You can use the Nuxt Simple Sitemap Stackblitz playgrounds for either:
You can use the Nuxt Sitemap Stackblitz playgrounds for either:
- Playing around with the module in a sandbox environment
- Making reproductions for issues (Learn more about [Why Reproductions are Required](https://antfu.me/posts/why-reproductions-are-required))

Expand Down
2 changes: 1 addition & 1 deletion docs/content/2.sitemap/1.integrations/0.i18n.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Nuxt I18n
description: How to use the Nuxt Simple Sitemap module with Nuxt I18n.
description: How to use the Nuxt Sitemap module with Nuxt I18n.
---

Out of the box, the sitemap module will integrate directly with [@nuxtjs/i18n](https://v8.i18n.nuxtjs.org/).
Expand Down
4 changes: 2 additions & 2 deletions docs/content/2.sitemap/1.integrations/1.content.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Nuxt Content
description: How to use the Nuxt Simple Sitemap module with Nuxt Content.
description: How to use the Nuxt Sitemap module with Nuxt Content.
---

Nuxt Simple Sitemap integrates with Nuxt Content out of the box.
Nuxt Sitemap integrates with Nuxt Content out of the box.

It comes with automatic configuration when using document driven mode.
Otherwise, you can opt in on each markdown file or set up your own [app source](/sitemap/getting-started/data-sources).
Expand Down
4 changes: 2 additions & 2 deletions docs/content/2.sitemap/2.guides/7.debugging.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: Debugging
description: How to debug the sitemap generated from Nuxt Simple Sitemap.
description: How to debug the sitemap generated from Nuxt Sitemap.
---

It's quite likely at some point you'll open your sitemap and think "this isn't right".

## Nuxt DevTools

The best tool for debugging is the Nuxt DevTools integration with Nuxt Simple Sitemap.
The best tool for debugging is the Nuxt DevTools integration with Nuxt Sitemap.

This will show you all of your sitemaps and the sources used to generate it.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/2.sitemap/5.releases/v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ This is similar behavior to using `nuxt/content` with `documentDriven: true`.
- Type: `boolean`
- Default: `true`

Allows you to remove the "Generate by Nuxt Simple Sitemap" comment from the generated sitemap.
Allows you to remove the "Generate by Nuxt Sitemap" comment from the generated sitemap.

### New Config: `xslTips`

Expand Down
6 changes: 3 additions & 3 deletions docs/content/2.sitemap/5.releases/v4.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
navigation:
title: v4.0.0
title: Nuxt Simple Sitemap v4.0.0
description: Release notes for v4.0.0 of Nuxt Simple Sitemap.
title: Nuxt Sitemap v4.0.0
description: Release notes for v4.0.0 of Nuxt Sitemap.
---

## Background
Expand All @@ -28,7 +28,7 @@ For full documentation see [Sitemap Sources](/sitemap/getting-started/data-sourc

### 🤝 Nuxt Dev Tools Integration

Nuxt Simple Sitemap now has a dedicated tab in Nuxt Dev Tools to help you debug.
Nuxt Sitemap now has a dedicated tab in Nuxt Dev Tools to help you debug.

<details open="" class="details-reset border rounded-2">
<summary class="px-3 py-2">
Expand Down
58 changes: 58 additions & 0 deletions docs/content/2.sitemap/5.releases/v5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
navigation:
title: v5.0.0
title: Nuxt Sitemap v5.0.0
description: Release notes for v5.0.0 of Nuxt Sitemap.
---

## 🚨 Breaking Changes

### Package Renamed to `@nuxtjs/sitemap`

This module is now the official Sitemap module for Nuxt. To properly
reflect this, the package has been renamed to `@nuxtjs/sitemap` from `nuxt-simple-sitemap` and
the GitHub repository has been moved to [nuxt-modules/sitemap](https://github.com/nuxt-modules/sitemap).

1. Update the dependency

```diff
{
"dependencies": {
- "nuxt-simple-sitemap": "*"
+ "@nuxtjs/sitemap": "^5.0.0"
}
}
```

2. Update your `nuxt.config`.

```diff
export default defineNuxtConfig({
modules: [
- 'nuxt-simple-sitemap'
+ '@nuxtjs/sitemap'
]
})
```

## Features :rocket:

## &nbsp;&nbsp;&nbsp;🐞 Bug Fixes

### Improved Cache Debugging

- Set browser cache time to match `cacheMaxAgeSeconds` &nbsp;-&nbsp; by @harlan-zw [<samp>(00d17)</samp>](https://github.com/nuxt-modules/sitemap/commit/00d176e)
- Iso timestamp for debugging cache &nbsp;-&nbsp; by @harlan-zw [<samp>(db3f3)</samp>](https://github.com/nuxt-modules/sitemap/commit/db3f337)
- Cache headers for prerendered sitemap &nbsp;-&nbsp; by @harlan-zw [<samp>(57bef)</samp>](https://github.com/nuxt-modules/sitemap/commit/57bef21)
- More explicit caching &nbsp;-&nbsp; by @harlan-zw [<samp>(328b7)</samp>](https://github.com/nuxt-modules/sitemap/commit/328b737)

### More Consistent DevTools UI

The DevTools has been updated to match the branding of the other Nuxt SEO module DevTools. [<samp>(bc4ae)</samp>](https://github.com/nuxt-modules/sitemap/commit/bc4aebc)

### Others

- Redirect multi sitemap `sitemap.xml` using route rules &nbsp;-&nbsp; by @harlan-zw [<samp>(e1bee)</samp>](https://github.com/nuxt-modules/sitemap/commit/e1bee81)


##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https://github.com/nuxt-modules/sitemap/compare/v4.4.1...v5.0.0)
4 changes: 2 additions & 2 deletions docs/content/6.link-checker/2.guides/0.integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ title: Integrations
description: See which modules work with Nuxt Link Checker.
---

## Nuxt Simple Sitemap
## Nuxt Sitemap

- [nuxt-simple-sitemap](/sitemap/getting-started/installation)
- [@nuxtjs/sitemap](/sitemap/getting-started/installation)

The sitemap will be used to determine valid routes that can be used for link fixing.
8 changes: 5 additions & 3 deletions docs/utils/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ export const SitemapModule = {
slug: 'sitemap',
label: 'Sitemap',
tag: {
label: 'v4',
to: '/sitemap/releases/v4',
new: true,
label: 'v5',
to: '/sitemap/releases/v5',
date: new Date('2024-01-06'),
},
fullLabel: 'Nuxt Simple Sitemap',
fullLabel: 'Nuxt Sitemap',
to: '/sitemap/getting-started/installation',
icon: 'carbon:load-balancer-application',
description: 'Powerfully flexible XML Sitemaps that integrate seamlessly.',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"nuxt-schema-org": "^3.3.0",
"nuxt-seo-experiments": "^4.0.0-rc.0",
"nuxt-simple-robots": "^4.0.0-rc.9",
"nuxt-simple-sitemap": "^4.4.1",
"@nuxtjs/sitemap": "^5.0.0",
"nuxt-site-config": "^2.2.0",
"nuxt-site-config-kit": "^2.2.0",
"ufo": "^1.3.2"
Expand All @@ -66,6 +66,6 @@
"nitropack": "^2.8.1",
"nuxt": "^3.9.0",
"typescript": "^5.3.3",
"vitest": "^1.1.1"
"vitest": "^1.1.3"
}
}
Loading

0 comments on commit b1e4374

Please sign in to comment.