fully ignore tags object for caps
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m19s

This commit is contained in:
2026-03-19 01:07:12 -04:00
parent 64ae9c1082
commit eb9e8eeecb
+7 -6
View File
@@ -143,12 +143,13 @@ export async function getPostsData(
// Merges post.tags (e.g. "JavaScript") with HTML-rendered span variants for better coverage. // Merges post.tags (e.g. "JavaScript") with HTML-rendered span variants for better coverage.
const casingCounts = new Map<string, number>() const casingCounts = new Map<string, number>()
for (const post of allPosts) { for (const post of allPosts) {
// From API tags array // From API tags array - this is the source of truth for which tags are actually present on the post, but it doesn't preserve original casing (all lowercase).
for (const t of post.tags ?? []) { // for (const t of post.tags ?? []) {
if (t.name.toLowerCase() === lowerTag) { // if (t.name.toLowerCase() === lowerTag) {
casingCounts.set(t.name, (casingCounts.get(t.name) ?? 0) + 1) // casingCounts.set(t.name, (casingCounts.get(t.name) ?? 0) + 1)
} // }
} // }
// From HTML content (preserves original casing as typed by the user) // From HTML content (preserves original casing as typed by the user)
for (const variant of extractTagsFromHtml(post.content)) { for (const variant of extractTagsFromHtml(post.content)) {
if (variant.toLowerCase() === lowerTag) { if (variant.toLowerCase() === lowerTag) {