Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions patches/@astrojs+starlight+0.34.1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,15 @@ index 6d173df..61eed80 100644
{label}
</a>
</li>
diff --git a/node_modules/@astrojs/starlight/utils/git.ts b/node_modules/@astrojs/starlight/utils/git.ts
index 1536fac..94876b1 100644
--- a/node_modules/@astrojs/starlight/utils/git.ts
+++ b/node_modules/@astrojs/starlight/utils/git.ts
@@ -72,6 +72,7 @@ export function getAllNewestCommitDate(rootPath: string, docsPath: string): [str
{
cwd: repoRoot,
encoding: 'utf-8',
+ maxBuffer: 10 * 1024 * 1024,
}
);

11 changes: 10 additions & 1 deletion src/components/overrides/Head.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const NOINDEX_PRODUCTS = ["email-security", "style-guide", "security"];

const currentSection = Astro.url.pathname.split("/")[1].replaceAll(".", "");

const { entry, head } = Astro.locals.starlightRoute;
const { entry, head, lastUpdated } = Astro.locals.starlightRoute;
const frontmatter = entry.data;

const metaTags = [] as Record<string, string>[];
Expand Down Expand Up @@ -126,6 +126,15 @@ if (frontmatter.tags) {
});
}

if (lastUpdated) {
const daysBetween = differenceInCalendarDays(new Date(), lastUpdated);

metaTags.push({
name: "pcx_last_modified",
content: daysBetween.toString(),
});
}

if (frontmatter.updated) {
const daysBetween = differenceInCalendarDays(new Date(), frontmatter.updated);

Expand Down
Loading