Skip to content

Commit 952efd3

Browse files
committed
Use local docs images
1 parent 93fcb5f commit 952efd3

File tree

3 files changed

+16
-53
lines changed

3 files changed

+16
-53
lines changed

docs/README.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"dev": "astro dev",
1010
"start": "astro dev",
1111
"build": "astro build",
12-
"publicize-assets": "rm -rf ../public/docs && cp -R dist ../public/docs && rm ../public/docs/index.html && rm -rf ../public/docs/1.x && rm -rf ../public/docs/2.x && rm -rf ../public/docs/3.x && rm -rf ../public/docs/4.x && rm -rf ./preserved-dist && cp -R dist ./preserved-dist",
12+
"publicize-assets": "rm -rf ../public/docs && cp -R dist ../public/docs && rm ../public/docs/index.html && rm -rf ../public/docs/1.x && rm -rf ../public/docs/2.x && rm -rf ../public/docs/3.x && rm -rf ../public/docs/4.x && rm -rf ./preserved-dist && cp -R dist ./preserved-dist && mkdir -p ../public/docs/3.x && cp -R filament/3.x/docs-assets/screenshots/images ../public/docs/3.x/images",
1313
"generate": "npm run checkout && npm run sync && npm run build && npm run publicize-assets",
1414
"generate-dev": "npm run sync && npm run build && npm run publicize-assets",
1515
"preview": "astro preview",

docs/src/components/AutoScreenshot.astro

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ const image = fs.readFileSync(new URL(
1111
const dimensions = probe.sync(image);
1212
---
1313

14-
<div style={`aspect-ratio: ${dimensions.width} / ${dimensions.height}`} class="rounded-xl ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
15-
<img
16-
src={`https://github.com/filamentphp/filament/blob/${version}/docs-assets/screenshots/images/light/${name}.jpg?raw=true`}
17-
alt={alt}
18-
loading="lazy"
19-
decoding="async"
20-
class="rounded-xl dark:hidden"
21-
/>
14+
<div style={`aspect-ratio: ${dimensions.width} / ${dimensions.height}`} class="rounded-xl mb-6 ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
15+
<img
16+
src={`/docs/${version}/images/light/${name}.jpg`}
17+
alt={alt}
18+
loading="lazy"
19+
decoding="async"
20+
class="rounded-xl dark:hidden"
21+
/>
2222

23-
<img
24-
src={`https://github.com/filamentphp/filament/blob/${version}/docs-assets/screenshots/images/dark/${name}.jpg?raw=true`}
25-
alt={alt}
26-
loading="lazy"
27-
decoding="async"
28-
class="rounded-xl hidden dark:block"
29-
/>
23+
<img
24+
src={`/docs/${version}/images/dark/${name}.jpg`}
25+
alt={alt}
26+
loading="lazy"
27+
decoding="async"
28+
class="rounded-xl hidden dark:block"
29+
/>
3030
</div>
3131

0 commit comments

Comments
 (0)