11---
2- import DefaultHead from ' @astrojs/starlight/components/Head.astro'
3- import type { Props } from ' @astrojs/starlight/props'
4- import { getCldOgImageUrl } from ' svelte-cloudinary'
5- import { klona } from ' klona'
2+ import DefaultHead from ' @astrojs/starlight/components/Head.astro' ;
3+ import type { Props } from ' @astrojs/starlight/props' ;
4+ import { getCldOgImageUrl } from ' svelte-cloudinary' ;
5+ import { klona } from ' klona' ;
66
77// @ts-expect-error Hack to stop Astro erroring
8- delete Astro .props .labels
8+ delete Astro .props .labels ;
99
10- const props = klona (Astro .props )
11- const title = props .entry .data .title
10+ const props = klona (Astro .props );
11+ const title = props .entry .data .title ;
1212
13- props .entry .data .title = props .entry .data .title .replace (/ <| \s ? \/ ? >/ g , ' ' )
13+ props .entry .data .title = props .entry .data .title .replace (/ <| \s ? \/ ? >/ g , ' ' );
1414
1515const image = getCldOgImageUrl ({
16- src: ' images/next-cloudinary-social-background' ,
17- crop: ' fit' ,
18- overlays: [
16+ src: ' images/next-cloudinary-social-background' ,
17+ crop: ' fit' ,
18+ overlays: [
1919 {
2020 width: 2000 ,
2121 crop: ' fit' ,
2222 position: {
23- y: - 160
23+ y: - 160 ,
2424 },
2525 text: {
2626 color: ' white' ,
@@ -29,42 +29,42 @@ const image = getCldOgImageUrl({
2929 fontWeight: ' black' ,
3030 text: title ,
3131 alignment: ' center' ,
32- lineSpacing: - 50
33- }
32+ lineSpacing: - 50 ,
33+ },
3434 },
3535 {
3636 publicId: ' images/cloudinary-white' ,
3737 position: {
3838 x: - 350 ,
39- y: 180
40- }
39+ y: 180 ,
40+ },
4141 },
4242 {
4343 publicId: ' images/svelte-white' ,
4444 position: {
4545 x: 300 ,
46- y: 180
47- }
46+ y: 180 ,
47+ },
4848 },
4949 {
5050 position: {
5151 y: 320 ,
52- x: - 50
52+ x: - 50 ,
5353 },
5454 text: {
5555 color: ' white' ,
5656 fontFamily: ' Source Sans Pro' ,
5757 fontSize: 60 ,
5858 fontWeight: ' bold' ,
59- text: ' svelte.cloudinary.dev'
60- }
61- }
62- ]
63- })
59+ text: ' svelte.cloudinary.dev' ,
60+ },
61+ },
62+ ],
63+ });
6464---
6565
6666<DefaultHead {... props }>
67- <slot />
67+ <slot />
6868</DefaultHead >
6969
7070<meta property =" og:image" content ={ image } />
0 commit comments