From fcac2da545ffdb61f0d52c013066050118a1298f Mon Sep 17 00:00:00 2001 From: Gaurav agarwal Date: Fri, 24 Jul 2026 21:12:19 +0530 Subject: [PATCH 1/2] Post-deploy fixes: dedupe BreadcrumbList JSON-LD, relative 301 redirects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two cleanups found while testing the deployed site: - tech-article-jsonld.js: stop injecting BreadcrumbList — the Docusaurus theme already emits a BreadcrumbList for its visual breadcrumbs, so every page had a duplicate. Keep TechArticle only; remove the now-dead breadcrumb/humanize helpers. - nginx: add `absolute_redirect off` — behind TLS termination nginx emitted http:// Location headers on internal 301s (old PumpFun casing, legacy MCP path), forcing an extra http->https upgrade hop. Relative Location keeps https. Verified live pre-fix: real 404s, gzip, all 301s, new pages, robots/llms/sitemap, favicon, GA4 dedupe all working — these were the only two issues. Co-Authored-By: Claude Fable 5 --- nginx/default.conf | 4 ++++ plugins/tech-article-jsonld.js | 35 +++------------------------------- 2 files changed, 7 insertions(+), 32 deletions(-) diff --git a/nginx/default.conf b/nginx/default.conf index ee2ff42c..71a7c7ed 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -5,6 +5,10 @@ server { root /usr/share/nginx/html; index index.html; + # Behind TLS termination nginx sees plain http; emit relative Location headers + # so 301s keep the client's https scheme (no extra http->https upgrade hop). + absolute_redirect off; + # --- Compression (WP-0.1) --- # The base image gzips text/html only; add JS/CSS/SVG/JSON so bundles ship # compressed. Brotli is intentionally NOT enabled: nginx:stable-alpine ships diff --git a/plugins/tech-article-jsonld.js b/plugins/tech-article-jsonld.js index 74377b43..a8d43270 100644 --- a/plugins/tech-article-jsonld.js +++ b/plugins/tech-article-jsonld.js @@ -69,33 +69,6 @@ function gitDate(siteDir, filePath, first) { } } -function humanize(seg) { - return seg - .replace(/[-_]+/g, " ") - .replace(/\b\w/g, (c) => c.toUpperCase()); -} - -function breadcrumb(base, permalink, title) { - const parts = permalink.split("/").filter(Boolean); // e.g. ["docs","blockchain","Solana","x"] - const items = []; - let acc = ""; - parts.forEach((seg, i) => { - acc += `/${seg}`; - const isLast = i === parts.length - 1; - items.push({ - "@type": "ListItem", - position: i + 1, - name: isLast ? title || humanize(seg) : seg === "docs" ? "Docs" : humanize(seg), - item: `${base}${acc}/`, - }); - }); - return { - "@context": "https://schema.org", - "@type": "BreadcrumbList", - itemListElement: items, - }; -} - /** @type {import('@docusaurus/types').PluginModule} */ module.exports = function techArticleJsonLdPlugin(context) { return { @@ -142,11 +115,9 @@ module.exports = function techArticleJsonLdPlugin(context) { }, }; - const crumbs = breadcrumb(base, permalink, title); - - const tag = - `` + - ``; + // BreadcrumbList is emitted natively by the Docusaurus theme's breadcrumbs, + // so we inject only TechArticle here to avoid duplicate structured data. + const tag = ``; let html = fs.readFileSync(htmlPath, "utf8"); if (html.includes('"@type":"TechArticle"')) { From 992d970f763939d34bf86c93775e64dadb247336 Mon Sep 17 00:00:00 2001 From: Gaurav agarwal Date: Fri, 24 Jul 2026 21:18:44 +0530 Subject: [PATCH 2/2] Add to sitemap (git-based dates) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set sitemap `lastmod: "date"` so every doc URL carries a derived from its last git commit (showLastUpdateTime is already enabled). 532/573 URLs now have lastmod — the remainder are auto-generated category routes with no source file. lastmod is the one sitemap field Google actually uses for recrawl. Co-Authored-By: Claude Fable 5 --- docusaurus.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index e465d14e..3e139d38 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1154,6 +1154,7 @@ const config = { sitemap: { changefreq: "weekly", priority: 0.5, + lastmod: "date", ignorePatterns: [ "/docs/graphql-reference/**", "/markdown-page/**",