diff --git a/src/components/overrides/Head.astro b/src/components/overrides/Head.astro index 4e86d946e38a8c..f63fef324adc15 100644 --- a/src/components/overrides/Head.astro +++ b/src/components/overrides/Head.astro @@ -12,6 +12,7 @@ const NOINDEX_PRODUCTS = ["email-security", "style-guide", "security"]; const currentSection = Astro.url.pathname.split("/")[1].replaceAll(".", ""); const entry = Astro.locals.starlightRoute.entry; +const lastUpdated = Astro.locals.starlightRoute.lastUpdated const frontmatter = entry.data; const head = frontmatter.head; @@ -64,6 +65,18 @@ if (currentSection) { }); } + if (lastUpdated) { + const daysBetweenUpdate = differenceInCalendarDays(new Date(), lastUpdated); + head.push({ + tag: "meta", + attrs: { + name: "pcx_last_modified", + content: daysBetweenUpdate.toString(), + }, + content: "", + }); + } + if (product.data.product.group) { head.push({ tag: "meta",