We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0914eb1 commit a09fc4cCopy full SHA for a09fc4c
.github/workflows/preview.yml
@@ -33,7 +33,7 @@ jobs:
33
run: make install
34
35
- name: Build the website
36
- run: make build
+ run: make build PREVIEW=true
37
38
- name: Set up SSH key
39
uses: webfactory/[email protected]
src/pages/robots.txt.ts
@@ -0,0 +1,19 @@
1
+import type { APIRoute } from "astro";
2
+
3
+const previewRobots = `
4
+User-agent: *
5
+Disallow: /
6
+`;
7
8
+const prodRobots = `
9
10
+Disallow: /_astro/
11
+Disallow: /*?
12
+Allow: /
13
14
+Sitemap: https://ep2025.europython.eu/sitemap-index.xml
15
16
17
+const isPreview = String(import.meta.env.PREVIEW).toLowerCase() === "true";
18
+export const GET: APIRoute = () =>
19
+ new Response(isPreview ? previewRobots : prodRobots);
0 commit comments