Skip to content

Commit b684968

Browse files
authored
Update deps (#212)
1 parent 474c90a commit b684968

File tree

15 files changed

+1932
-1164
lines changed

15 files changed

+1932
-1164
lines changed

.changeset/ten-trees-shout.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@astro-community/astro-embed-integration': patch
3+
'@astro-community/astro-embed-utils': patch
4+
---
5+
6+
Updates internal dependencies

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ The Astro site in the [`/demo`](demo) directory can be used to preview the vario
1818

1919
All commands are run from the root of the project, from a terminal:
2020

21-
| Command | Action |
22-
| :------------ | :-------------------------------------------------------------- |
23-
| `pnpm install` | Installs dependencies |
24-
| `pnpm start` | Starts local dev server for the `demo` site at `localhost:3000` |
25-
| `pnpm t` | Run the test suite |
21+
| Command | Action |
22+
| :------------- | :-------------------- |
23+
| `pnpm install` | Installs dependencies |
24+
| `pnpm t` | Run the test suite |
2625

2726
## 🧪 Testing
2827

29-
You can run unit tests by running `pnpm t` in a terminal or run `pnpm start` to start a dev server for the demo project.
28+
You can run unit tests by running `pnpm t` in a terminal or run `pnpm start` in the `demo/` directory to start a dev server for the demo project.
3029

3130
## ✨ Want to contribute?
3231

demo/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"preview": "astro preview"
1010
},
1111
"devDependencies": {
12-
"@astrojs/mdx": "^2.2.2",
13-
"astro": "^4.16.19"
12+
"@astrojs/mdx": "^4.3.7",
13+
"astro": "^5.14.4"
1414
}
1515
}

docs/astro.config.mjs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,23 @@ export default defineConfig({
1515
dark: './src/assets/logo-dark.svg',
1616
replacesTitle: true,
1717
},
18-
social: {
19-
github: 'https://github.com/delucis/astro-embed',
20-
},
18+
social: [
19+
{
20+
icon: 'github',
21+
label: 'GitHub',
22+
href: 'https://github.com/delucis/astro-embed',
23+
},
24+
],
2125
sidebar: [
22-
{ label: 'Getting started', link: '/getting-started/' },
26+
'getting-started',
2327
{
2428
label: 'Components',
2529
autogenerate: { directory: 'components' },
2630
},
27-
{ label: 'Auto-embed URLs', link: '/integration/' },
31+
{ label: 'Auto-embed URLs', slug: 'integration' },
2832
],
2933
customCss: ['./src/assets/theme.css'],
30-
components: {
31-
Head: './src/overrides/Head.astro',
32-
},
34+
routeMiddleware: './src/routeData.ts',
3335
}),
3436
],
3537
});

docs/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"@astrojs/starlight": "^0.24.0",
15-
"astro": "^4.16.19",
16-
"astro-og-canvas": "^0.4.2",
17-
"expressive-code-color-chips": "^0.1.0",
18-
"sharp": "^0.32.5",
19-
"starlight-package-managers": "^0.4.0"
14+
"@astrojs/starlight": "^0.36.0",
15+
"astro": "^5.14.4",
16+
"astro-og-canvas": "^0.7.2",
17+
"canvaskit-wasm": "^0.40.0",
18+
"expressive-code-color-chips": "^0.1.2",
19+
"sharp": "^0.34.4",
20+
"starlight-package-managers": "^0.11.0"
2021
}
2122
}

docs/src/content/config.ts renamed to docs/src/content.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { defineCollection, z } from 'astro:content';
2+
import { docsLoader } from '@astrojs/starlight/loaders';
23
import { docsSchema } from '@astrojs/starlight/schema';
34

45
export const collections = {
56
docs: defineCollection({
7+
loader: docsLoader(),
68
schema: docsSchema({
79
extend: z.object({
810
// Require a description for every page.

docs/src/content/docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ hero:
1010
- text: Get Started
1111
link: /getting-started/
1212
icon: right-arrow
13-
variant: primary
1413
- text: Star on GitHub
1514
link: https://github.com/delucis/astro-embed
1615
icon: star
16+
variant: minimal
1717
---
1818

1919
import { Icon, Card, CardGrid } from '@astrojs/starlight/components';

docs/src/overrides/Head.astro

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

docs/src/routeData.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { defineRouteMiddleware } from '@astrojs/starlight/route-data';
2+
3+
export const onRequest = defineRouteMiddleware((context) => {
4+
// Get the URL of the generated image for the current page using its ID and
5+
// append the `.png` file extension.
6+
const ogImageUrl = new URL(
7+
`/og/${context.locals.starlightRoute.id || 'index'}.png`,
8+
context.site
9+
);
10+
11+
// Get the array of all tags to include in the `<head>` of the current page.
12+
const { head } = context.locals.starlightRoute;
13+
14+
// Add the `<meta/>` tags for the Open Graph images.
15+
head.push({
16+
tag: 'meta',
17+
attrs: { property: 'og:image', content: ogImageUrl.href },
18+
});
19+
head.push({
20+
tag: 'meta',
21+
attrs: { name: 'twitter:image', content: ogImageUrl.href },
22+
});
23+
});

package.json

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,25 @@
44
"license": "MIT",
55
"private": true,
66
"scripts": {
7-
"start": "astro --root demo dev",
8-
"build": "astro --root demo build",
9-
"serve": "astro --root demo preview",
107
"test": "uvu tests -i utils",
118
"format": "prettier -w .",
129
"lint": "eslint . --ext .ts,.js"
1310
},
1411
"devDependencies": {
15-
"@changesets/changelog-github": "^0.4.4",
16-
"@changesets/cli": "^2.29.6",
17-
"@testing-library/dom": "^8.13.0",
18-
"@types/eslint": "^8.44.0",
19-
"@types/node": "^16.11.68",
12+
"@changesets/changelog-github": "^0.5.1",
13+
"@changesets/cli": "^2.29.7",
14+
"@testing-library/dom": "^8.20.1",
15+
"@types/eslint": "^8.56.12",
16+
"@types/node": "^20.19.21",
2017
"@types/prettier": "^2.7.3",
21-
"@typescript-eslint/eslint-plugin": "^6.0.0",
22-
"@typescript-eslint/parser": "^6.0.0",
18+
"@typescript-eslint/eslint-plugin": "^6.21.0",
19+
"@typescript-eslint/parser": "^6.21.0",
2320
"astro": "^4.16.19",
2421
"astro-component-tester": "^0.8.0",
2522
"eslint": "^8.45.0",
26-
"eslint-config-prettier": "^8.8.0",
27-
"eslint-plugin-prettier": "^4.2.1",
28-
"linkedom": "^0.14.7",
23+
"eslint-config-prettier": "^8.10.2",
24+
"eslint-plugin-prettier": "^4.2.5",
25+
"linkedom": "^0.18.12",
2926
"lz-string": "^1.5.0",
3027
"prettier": "^2.8.8",
3128
"prettier-plugin-astro": "^0.10.0",

0 commit comments

Comments
 (0)