Skip to content

Commit 425a071

Browse files
authored
Merge branch 'main' into emmanuel/config_regex_size_limit
2 parents 9b9f162 + b395762 commit 425a071

File tree

243 files changed

+6158
-2234
lines changed

Some content is hidden

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

243 files changed

+6158
-2234
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ pnpm-debug.log*
2424
.idea/
2525

2626
# Local Netlify folder
27-
.netlifuy
27+
.netlify
28+
29+
# Minified build files
30+
aws/viewer-request/index.min.js
2831

2932
# vim
3033
*.swp

.vscode/extensions.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2-
"recommendations": ["astro-build.astro-vscode", "biomejs.biome"],
2+
"recommendations": [
3+
"astro-build.astro-vscode",
4+
"biomejs.biome",
5+
"kyledavide.vscode-project-links"
6+
],
37
"unwantedRecommendations": []
48
}

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,13 @@ deploy:
7777
@echo "Deploy..."
7878
aws s3 sync --region eu-west-2 --cache-control "public, max-age=31536000, immutable" --exclude '.DS_Store' --exclude '*' --include '*.webp' --content-type 'image/webp' ./dist/docs/_astro s3://www.surrealdb.com/docs/_astro/
7979
aws s3 sync --region eu-west-2 --cache-control "public, max-age=31536000, immutable" --exclude '.DS_Store' --exclude '*.webp' ./dist/docs/_astro s3://www.surrealdb.com/docs/_astro/
80+
aws s3 cp --region eu-west-2 --cache-control "public, max-age=300" ./dist/docs/llms.txt s3://www.surrealdb.com/docs/
8081
aws s3 sync --region eu-west-2 --cache-control "public, max-age=30" --delete --exclude '*' --include '*.html' ./dist/docs/ s3://www.surrealdb.com/docs/
8182

8283
.PHONY: stage
8384
stage:
8485
@echo "Stage..."
8586
aws s3 sync --region eu-west-2 --cache-control "public, max-age=31536000, immutable" --exclude '.DS_Store' --exclude '*' --include '*.webp' --content-type 'image/webp' ./dist/docs/_astro s3://www.surrealdb.dev/docs/_astro/
8687
aws s3 sync --region eu-west-2 --cache-control "public, max-age=31536000, immutable" --exclude '.DS_Store' --exclude '*.webp' ./dist/docs/_astro s3://www.surrealdb.dev/docs/_astro/
88+
aws s3 cp --region eu-west-2 --cache-control "public, max-age=86400" ./dist/docs/llms.txt s3://www.surrealdb.dev/docs/
8789
aws s3 sync --region eu-west-2 --cache-control "public, max-age=30" --delete --exclude '*' --include '*.html' ./dist/docs/ s3://www.surrealdb.dev/docs/

README.md

Lines changed: 8 additions & 0 deletions

astro.config.mjs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { autolinkConfig } from './src/util/rehypeHeadingsConfig';
1414
import { rehypeNotesPlugin } from './src/util/rehypeNotesPlugin.mjs';
1515

1616
import sitemap from '@astrojs/sitemap';
17-
import llms from 'vite-plugin-llms';
1817

1918
const deployDomain = process.env.DEPLOY_DOMAIN ?? 'surrealdb.com';
2019
const site = `https://${deployDomain}`;
@@ -48,11 +47,4 @@ export default defineConfig({
4847
],
4948
syntaxHighlight: false,
5049
},
51-
vite: {
52-
plugins: [
53-
llms({
54-
llmsDir: 'llms',
55-
}),
56-
],
57-
},
5850
});

aws/viewer-request/deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/sh -x
22

3+
bun esbuild index.js --minify --outfile=index.min.js
34
aws --profile surreal cloudfront describe-function --name www-surrealdb-com-docs-viewer-request > temp.json
45
ETAG=$(jq -r '.ETag' temp.json)
56
aws --profile surreal cloudfront update-function --name www-surrealdb-com-docs-viewer-request --function-code fileb://index.js --function-config Comment="",Runtime="cloudfront-js-2.0" --if-match $ETAG > temp.json

aws/viewer-request/index.js

Lines changed: 164 additions & 241 deletions
Large diffs are not rendered by default.

bun.lockb

400 Bytes
Binary file not shown.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@lezer/rust": "^1.0.2",
4343
"@lezer/yaml": "^1.0.3",
4444
"@solid-primitives/scroll": "^2.0.23",
45-
"@surrealdb/lezer": "^1.0.0-beta.16",
45+
"@surrealdb/lezer": "^1.0.0-beta.21",
4646
"@types/markdown-it": "^14.1.2",
4747
"astro": "^4.16.13",
4848
"astro-icon": "^1.1.2",
@@ -59,8 +59,7 @@
5959
"tailwind-merge": "^2.5.4",
6060
"tailwindcss": "^3.4.15",
6161
"typescript": "^5.6.3",
62-
"unist-util-visit": "^5.0.0",
63-
"vite-plugin-llms": "^1.0.2"
62+
"unist-util-visit": "^5.0.0"
6463
},
6564
"devDependencies": {
6665
"@biomejs/biome": "1.8.3",

llms/llms.txt renamed to public/llms.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,19 @@ Things to remember when working with SurrealDB:
6060
- [Aeon's Surreal Renaissance](https://surrealdb.com/learn/book)
6161
- [Surreal Sidekick](https://surrealist.app/cloud/chat)
6262

63+
## Raw markdown content
64+
65+
To find the raw markdown content for a route, follow these instructions:
66+
- For a route which matches `/docs/sdk/{language}/{...path}`, you can translate it to either of:
67+
- https://raw.githubusercontent.com/surrealdb/docs.surrealdb.com/refs/heads/main/src/content/doc-sdk-{language}/{path}.md(x?)
68+
- https://raw.githubusercontent.com/surrealdb/docs.surrealdb.com/refs/heads/main/src/content/doc-sdk-{language}/{path}/index.md(x?)
69+
- For a route which matches `/docs/{doc}/{...path}`, you can translate it to either of:
70+
- https://raw.githubusercontent.com/surrealdb/docs.surrealdb.com/refs/heads/main/src/content/doc-{doc}/{path}.md(x?)
71+
- https://raw.githubusercontent.com/surrealdb/docs.surrealdb.com/refs/heads/main/src/content/doc-{doc}/{path}/index.md(x?)
72+
73+
Notice the ending file extension (`.md(x?)`), by this I mean that the file extension may be either of `.md` or `.mdx`, however `.mdx` is most likely to be the file extension.
74+
For either of the two criteria, if the ending `/{...path}` is missing, the file under the `content/doc-{...}` folder will be `index.md(x?)`
75+
76+
### Example:
77+
- Website route: /docs/sdk/javascript/data-types
78+
- Raw markdown URL: https://raw.githubusercontent.com/surrealdb/docs.surrealdb.com/refs/heads/main/src/content/doc-sdk-javascript/data-types.mdx

0 commit comments

Comments
 (0)