Skip to content

Commit 825c9b7

Browse files
committed
add link rel=canonical
1 parent 9af438a commit 825c9b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

observablehq.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ export default {
104104
globalStylesheets: [
105105
"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Spline+Sans+Mono:ital,wght@0,300..700;1,300..700&display=swap"
106106
],
107-
head: `<link rel="apple-touch-icon" href="/observable.png">
107+
head: ({path}) => `<link rel="canonical" href="https://observablehq.com/framework${path.replace(/\/index$/, "/")}">
108+
<link rel="apple-touch-icon" href="/observable.png">
108109
<link rel="icon" type="image/png" href="/observable.png" sizes="32x32">${
109110
process.env.CI
110111
? `

0 commit comments

Comments
 (0)