Skip to content

Commit 716d52e

Browse files
committed
make rel=alternate a fully qualified url
1 parent e23dfc8 commit 716d52e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/overrides/Head.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ head.push({
182182
attrs: {
183183
rel: "alternate",
184184
type: "text/markdown",
185-
href: Astro.url.pathname + "index.md",
185+
href: Astro.site + Astro.url.pathname.slice(1) + "index.md",
186186
},
187187
});
188188

worker/index.worker.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ describe("Cloudflare Docs", () => {
327327
"link[rel='alternate'][type='text/markdown']",
328328
)?.attributes.href;
329329

330-
expect(markdown).toBe("/workers/index.md");
330+
expect(markdown).toBe(
331+
"https://developers.cloudflare.com/workers/index.md",
332+
);
331333
});
332334

333335
it("og:image tag", () => {

0 commit comments

Comments
 (0)