Skip to content

Commit d22eded

Browse files
Merge branch 'Virtual-Coffee:main' into add-networking-guide-hero
2 parents df8044e + 248286d commit d22eded

File tree

43 files changed

+3112
-1734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3112
-1734
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@ yarn-error.log*
4444

4545
# typescript
4646
*.tsbuildinfo
47-
next-env.d.ts
47+
next-env.d.ts
48+
/deno.lock

netlify.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
[[plugins]]
77
package = "@netlify/plugin-nextjs"
88

9+
[[edge_functions]]
10+
function = "block-bots"
11+
path = "/*"
12+
913
[dev]
1014
command = "next dev"
1115
port = 9000
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// inspired (and taken) from ethan marcotte's blog post
2+
// https://ethanmarcotte.com/wrote/blockin-bots/
3+
const botUas = [
4+
'Amazonbot',
5+
'anthropic-ai',
6+
'Applebot-Extended',
7+
'Bytespider',
8+
'CCBot',
9+
'ChatGPT-User',
10+
'ClaudeBot',
11+
'Claude-Web',
12+
'cohere-ai',
13+
'DatadogSynthetics',
14+
'Diffbot',
15+
'DuckDuckBot',
16+
'FacebookBot',
17+
'FriendlyCrawler',
18+
'Google-Extended',
19+
'GoogleOther',
20+
'GoogleOther-Image',
21+
'GoogleOther-Video',
22+
'GPTBot',
23+
'ia_archiver',
24+
'ImagesiftBot',
25+
'img2dataset',
26+
'Meta-ExternalAgent',
27+
'OAI-SearchBot',
28+
'omgili',
29+
'omgilibot',
30+
'PerplexityBot',
31+
'search.marginalia.nu',
32+
'StractBot',
33+
'Trove',
34+
'Yandex',
35+
'YouBot',
36+
'AdsBot-Google',
37+
'Applebot',
38+
'AwarioRssBot',
39+
'AwarioSmartBot',
40+
'ChatGPT',
41+
'DataForSeoBot',
42+
'magpie-crawler',
43+
'Omgilibot',
44+
'peer39_crawler',
45+
];
46+
47+
export default async (request, context) => {
48+
const ua = request.headers.get('user-agent');
49+
50+
let isBot = false;
51+
52+
botUas.forEach((u) => {
53+
if (ua.toLowerCase().includes(u.toLowerCase())) {
54+
isBot = true;
55+
}
56+
});
57+
58+
const response = isBot
59+
? new Response(null, { status: 401 })
60+
: await context.next();
61+
return response;
62+
};

package.json

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"build-member-files": "src/content/members/**/*.ts"
2323
},
2424
"dependencies": {
25-
"@eslint/eslintrc": "^3.3.1",
26-
"@eslint/js": "^9.37.0",
25+
"@eslint/eslintrc": "^3.3.3",
26+
"@eslint/js": "^9.39.2",
2727
"@heroicons/react": "^2.2.0",
2828
"@imgix/js-core": "^3.8.0",
2929
"@mdx-js/loader": "^3.1.1",
@@ -35,19 +35,19 @@
3535
"bootstrap": "^4.6.2",
3636
"calendar-link": "^2.11.0",
3737
"front-matter": "^4.0.2",
38-
"graphql": "^16.11.0",
39-
"graphql-request": "^7.2.0",
38+
"graphql": "^16.12.0",
39+
"graphql-request": "^7.4.0",
4040
"hast-util-to-string": "^2.0.0",
4141
"hastscript": "^8.0.0",
4242
"leaflet": "^1.9.4",
4343
"leaflet.markercluster": "^1.5.3",
4444
"luxon": "^3.7.2",
4545
"markdown-it": "^13.0.2",
4646
"mdast-util-toc": "^7.1.0",
47-
"next": "15.5.5",
47+
"next": "^15.5.9",
4848
"npm-watch": "^0.13.0",
49-
"react": "19.2.0",
50-
"react-dom": "19.2.0",
49+
"react": "^19.2.3",
50+
"react-dom": "^19.2.3",
5151
"react-leaflet": "^5.0.0",
5252
"react-leaflet-cluster": "^3.1.1",
5353
"rehype-autolink-headings": "^6.1.1",
@@ -64,34 +64,29 @@
6464
"unified": "^10.1.2"
6565
},
6666
"devDependencies": {
67-
"@faker-js/faker": "^10.0.0",
68-
"@netlify/plugin-nextjs": "^5.13.5",
67+
"@faker-js/faker": "^10.1.0",
68+
"@netlify/plugin-nextjs": "^5.15.3",
6969
"@types/leaflet": "^1.9.21",
7070
"@types/leaflet.markercluster": "^1.5.6",
7171
"@types/luxon": "^3.7.1",
72-
"@types/node": "^24.7.2",
73-
"@types/react": "^19.2.2",
74-
"@types/react-dom": "^19.2.2",
72+
"@types/node": "^24.10.4",
73+
"@types/react": "^19.2.7",
74+
"@types/react-dom": "^19.2.3",
7575
"@types/require-dir": "^1.0.4",
7676
"@types/sanitize-html": "^2.16.0",
7777
"all-contributors-cli": "^6.26.1",
7878
"concurrently": "^9.2.1",
7979
"cross-env": "^10.1.0",
80-
"esbuild": "^0.25.10",
81-
"eslint": "^9.37.0",
82-
"eslint-config-next": "15.5.5",
83-
"netlify-cli": "^23.9.1",
80+
"esbuild": "^0.25.12",
81+
"eslint": "^9.39.2",
82+
"eslint-config-next": "^15.5.9",
83+
"netlify-cli": "^23.13.0",
8484
"postcss": "^8.5.6",
85-
"prettier": "^3.6.2",
86-
"sass": "^1.93.2",
87-
"tailwindcss": "^3.4.18",
88-
"tsx": "^4.20.6",
85+
"prettier": "^3.7.4",
86+
"sass": "^1.97.0",
87+
"tailwindcss": "^3.4.19",
88+
"tsx": "^4.21.0",
8989
"typescript": "^5.9.3"
9090
},
91-
"overrides": {
92-
"@types/react": "npm:types-react@rc",
93-
"@types/react-dom": "npm:types-react-dom@rc",
94-
"react": "rc",
95-
"react-dom": "rc"
96-
}
91+
"overrides": {}
9792
}

0 commit comments

Comments
 (0)