Skip to content

feat(content): derive content lastmod from frontmatter dates - #721

Merged
harlan-zw merged 1 commit into
mainfrom
feat/content-lastmod-from-frontmatter
Oct 13, 2026
Merged

harlan-zw merged 1 commit into
mainfrom
feat/content-lastmod-from-frontmatter

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Content pages got lastmod only from a declared updatedAt or seo.articleModifiedTime, so a page with only publishedAt or date, or with an undeclared date that Nuxt Content keeps in meta, had none. The module now reads a modification date first (updatedAt, modifiedAt, dateModified, lastModified), then a publication date (publishedAt, datePublished, date), from declared fields and meta. It skips values that are not dates, and an explicit sitemap.lastmod still wins. This changes the sitemap output for existing content sites, and contentLastmod: false turns it off.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

Content pages only got lastmod from updatedAt or seo.articleModifiedTime, so pages with only a publication date, or a date in meta, had none. The resolver now reads modification dates, then publication dates, from declared fields and meta, and skips values that are not dates. contentLastmod: false turns it off.
@pkg-pr-new

pkg-pr-new Bot commented Oct 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxtjs/sitemap@721

commit: eac69eb

@github-actions

Copy link
Copy Markdown

Nuxt logo Nuxt Module Size Analyzer

No notable runtime size changes.

Module Client gzip Server raw
@nuxtjs/sitemap 255 B 569 kB
Package files (9)

Rows overlap and include unused code. These totals do not measure deployed output or npm downloads.
Excludes dependency files, types, source maps, and other non-code files.

Package files Summed gzip Raw Δ gzip
@nuxtjs/sitemap · export . 17 kB 69 kB 🔴 +285 B (+1.7%)
@nuxtjs/sitemap · export ./content 1.1 kB 3.7 kB —
@nuxtjs/sitemap · export ./utils 2.3 kB 8.4 kB —
@nuxtjs/sitemap · built code files 60 kB 204 kB 🔴 +285 B (+0.5%)
@nuxtjs/sitemap · server source files 35 kB 109 kB —
sitemapd · export . 4.2 kB 16 kB —
sitemapd · export ./fetch 940 B 3.2 kB —
sitemapd · export ./parse 7.2 kB 33 kB —
sitemapd · built code files 14 kB 58 kB —
Dependencies (14)

Declared dependencies. Their installed size does not show runtime cost.

Package Dependency Requested
@nuxtjs/sitemap @nuxt/kit catalog:
@nuxtjs/sitemap consola catalog:
@nuxtjs/sitemap defu catalog:
@nuxtjs/sitemap nuxt-site-config catalog:
@nuxtjs/sitemap nuxtseo-shared catalog:
@nuxtjs/sitemap ofetch catalog:
@nuxtjs/sitemap ohash catalog:
@nuxtjs/sitemap oxc-parser catalog:
@nuxtjs/sitemap oxc-walker catalog:
@nuxtjs/sitemap radix3 catalog:
@nuxtjs/sitemap sitemapd workspace:^
@nuxtjs/sitemap ufo catalog:
@nuxtjs/sitemap ultrahtml catalog:
sitemapd fast-xml-parser catalog:
How this is measured
  • Compare the same app with and without the module.
  • Client: all emitted JS/CSS, summed per-file gzip. This includes lazy chunks.
  • Server: deployed files, including external dependencies. Source maps are excluded.
  • Default module settings, Node server preset. Memory and request speed are outside this report.

Base: main @ 79dd709 · 2026-10-13 · differences below 16 B are ignored

@harlan-zw

harlan-zw commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

Harlan Agent Kit posted this automated status. AI open source policy.

Action required: The release range changed. Request a new release after reviewing it.

@harlan-zw harlan-zw changed the title feat: derive content lastmod from frontmatter dates feat(content): derive content lastmod from frontmatter dates Oct 13, 2026
@harlan-zw
harlan-zw merged commit cd58cc8 into main Oct 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant