Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/ten-trees-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@astro-community/astro-embed-integration': patch
'@astro-community/astro-embed-utils': patch
---

Updates internal dependencies
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ The Astro site in the [`/demo`](demo) directory can be used to preview the vario

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

| Command | Action |
| :------------ | :-------------------------------------------------------------- |
| `pnpm install` | Installs dependencies |
| `pnpm start` | Starts local dev server for the `demo` site at `localhost:3000` |
| `pnpm t` | Run the test suite |
| Command | Action |
| :------------- | :-------------------- |
| `pnpm install` | Installs dependencies |
| `pnpm t` | Run the test suite |

## 🧪 Testing

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.
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.

## ✨ Want to contribute?

Expand Down
4 changes: 2 additions & 2 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"@astrojs/mdx": "^2.2.2",
"astro": "^4.16.19"
"@astrojs/mdx": "^4.3.7",
"astro": "^5.14.4"
}
}
18 changes: 10 additions & 8 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@ export default defineConfig({
dark: './src/assets/logo-dark.svg',
replacesTitle: true,
},
social: {
github: 'https://github.com/delucis/astro-embed',
},
social: [
{
icon: 'github',
label: 'GitHub',
href: 'https://github.com/delucis/astro-embed',
},
],
sidebar: [
{ label: 'Getting started', link: '/getting-started/' },
'getting-started',
{
label: 'Components',
autogenerate: { directory: 'components' },
},
{ label: 'Auto-embed URLs', link: '/integration/' },
{ label: 'Auto-embed URLs', slug: 'integration' },
],
customCss: ['./src/assets/theme.css'],
components: {
Head: './src/overrides/Head.astro',
},
routeMiddleware: './src/routeData.ts',
}),
],
});
13 changes: 7 additions & 6 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/starlight": "^0.24.0",
"astro": "^4.16.19",
"astro-og-canvas": "^0.4.2",
"expressive-code-color-chips": "^0.1.0",
"sharp": "^0.32.5",
"starlight-package-managers": "^0.4.0"
"@astrojs/starlight": "^0.36.0",
"astro": "^5.14.4",
"astro-og-canvas": "^0.7.2",
"canvaskit-wasm": "^0.40.0",
"expressive-code-color-chips": "^0.1.2",
"sharp": "^0.34.4",
"starlight-package-managers": "^0.11.0"
}
}
2 changes: 2 additions & 0 deletions docs/src/content/config.ts → docs/src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { defineCollection, z } from 'astro:content';
import { docsLoader } from '@astrojs/starlight/loaders';
import { docsSchema } from '@astrojs/starlight/schema';

export const collections = {
docs: defineCollection({
loader: docsLoader(),
schema: docsSchema({
extend: z.object({
// Require a description for every page.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ hero:
- text: Get Started
link: /getting-started/
icon: right-arrow
variant: primary
- text: Star on GitHub
link: https://github.com/delucis/astro-embed
icon: star
variant: minimal
---

import { Icon, Card, CardGrid } from '@astrojs/starlight/components';
Expand Down
18 changes: 0 additions & 18 deletions docs/src/overrides/Head.astro

This file was deleted.

23 changes: 23 additions & 0 deletions docs/src/routeData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { defineRouteMiddleware } from '@astrojs/starlight/route-data';

export const onRequest = defineRouteMiddleware((context) => {
// Get the URL of the generated image for the current page using its ID and
// append the `.png` file extension.
const ogImageUrl = new URL(
`/og/${context.locals.starlightRoute.id || 'index'}.png`,
context.site
);

// Get the array of all tags to include in the `<head>` of the current page.
const { head } = context.locals.starlightRoute;

// Add the `<meta/>` tags for the Open Graph images.
head.push({
tag: 'meta',
attrs: { property: 'og:image', content: ogImageUrl.href },
});
head.push({
tag: 'meta',
attrs: { name: 'twitter:image', content: ogImageUrl.href },
});
});
23 changes: 10 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,25 @@
"license": "MIT",
"private": true,
"scripts": {
"start": "astro --root demo dev",
"build": "astro --root demo build",
"serve": "astro --root demo preview",
"test": "uvu tests -i utils",
"format": "prettier -w .",
"lint": "eslint . --ext .ts,.js"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.4",
"@changesets/cli": "^2.29.6",
"@testing-library/dom": "^8.13.0",
"@types/eslint": "^8.44.0",
"@types/node": "^16.11.68",
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.7",
"@testing-library/dom": "^8.20.1",
"@types/eslint": "^8.56.12",
"@types/node": "^20.19.21",
"@types/prettier": "^2.7.3",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"astro": "^4.16.19",
"astro-component-tester": "^0.8.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"linkedom": "^0.14.7",
"eslint-config-prettier": "^8.10.2",
"eslint-plugin-prettier": "^4.2.5",
"linkedom": "^0.18.12",
"lz-string": "^1.5.0",
"prettier": "^2.8.8",
"prettier-plugin-astro": "^0.10.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/astro-embed-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@astro-community/astro-embed-vimeo": "^0.3.9",
"@astro-community/astro-embed-youtube": "^0.5.4",
"@types/unist": "^2.0.0",
"astro-auto-import": "^0.4.2",
"astro-auto-import": "^0.4.5",
"unist-util-select": "^4.0.1"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/astro-embed-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
},
"homepage": "https://github.com/delucis/astro-embed/tree/main/packages/astro-embed-utils#readme",
"dependencies": {
"linkedom": "^0.14.26"
"linkedom": "^0.18.12"
}
}
4 changes: 2 additions & 2 deletions packages/astro-embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
},
"homepage": "https://astro-embed.netlify.app/",
"dependencies": {
"@astro-community/astro-embed-bluesky": "^0.1.0",
"@astro-community/astro-embed-baseline-status": "^0.2.0",
"@astro-community/astro-embed-link-preview": "^0.2.2",
"@astro-community/astro-embed-bluesky": "^0.1.0",
"@astro-community/astro-embed-integration": "^0.8.0",
"@astro-community/astro-embed-link-preview": "^0.2.2",
"@astro-community/astro-embed-twitter": "^0.5.6",
"@astro-community/astro-embed-vimeo": "^0.3.10",
"@astro-community/astro-embed-youtube": "^0.5.5"
Expand Down
Loading
Loading