From 069f2edef19a3833e49863f450f8a2e5647e4cd5 Mon Sep 17 00:00:00 2001 From: prototypa Date: Sat, 13 Apr 2024 11:53:04 -0400 Subject: [PATCH] Fix to integrate with astro-embed --- package-lock.json | 151 +++++++++++++++++- package.json | 4 +- src/components/blog/SinglePost.astro | 4 +- .../post/markdown-elements-demo-post.mdx | 17 +- src/pages/[...blog]/index.astro | 4 +- src/pages/homes/startup.astro | 2 +- 6 files changed, 172 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 57f67e7..14e1109 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,20 @@ { "name": "@onwidget/astrowind", - "version": "1.0.0-beta.27", + "version": "1.0.0-beta.28", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@onwidget/astrowind", - "version": "1.0.0-beta.27", + "version": "1.0.0-beta.28", "dependencies": { - "@astro-community/astro-embed-youtube": "^0.5.2", "@astrojs/rss": "^4.0.5", "@astrojs/sitemap": "^3.1.2", "@astrolib/analytics": "^0.5.0", "@astrolib/seo": "^1.0.0-beta.5", "@fontsource-variable/inter": "^5.0.17", "astro": "^4.6.1", + "astro-embed": "^0.7.1", "astro-icon": "^1.1.0", "limax": "4.1.0", "lodash.merge": "^4.6.2", @@ -191,6 +191,66 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/@astro-community/astro-embed-integration": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@astro-community/astro-embed-integration/-/astro-embed-integration-0.7.0.tgz", + "integrity": "sha512-E7XX4sBcd49VBVJpP1cpHPWdxSLrwGWokGIwZKpBJzRxirWk6kxpjovLr3P2np8dK1JYOEkVFWjYQqRZzUILrg==", + "dependencies": { + "@astro-community/astro-embed-link-preview": "^0.1.0", + "@astro-community/astro-embed-twitter": "^0.5.4", + "@astro-community/astro-embed-vimeo": "^0.3.6", + "@astro-community/astro-embed-youtube": "^0.5.0", + "@types/unist": "^2.0.0", + "astro-auto-import": "^0.4.2", + "unist-util-select": "^4.0.1" + }, + "peerDependencies": { + "astro": "^2.0.0 || ^3.0.0-beta || ^4.0.0-beta" + } + }, + "node_modules/@astro-community/astro-embed-integration/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/@astro-community/astro-embed-link-preview": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@astro-community/astro-embed-link-preview/-/astro-embed-link-preview-0.1.0.tgz", + "integrity": "sha512-anRmnQV7fgONVI1EO1YmBKSBGWTWlekquvipBXdcqotfrsBFZVAqTGstbaFWkiVK+rKpRU1NIBJB0OmE1noh+w==", + "dependencies": { + "@astro-community/astro-embed-utils": "^0.1.1" + } + }, + "node_modules/@astro-community/astro-embed-twitter": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@astro-community/astro-embed-twitter/-/astro-embed-twitter-0.5.4.tgz", + "integrity": "sha512-wQyros0Uh4L8fDOCZ9+UYMoq4u+YiJZEvjnL6ZP0KL6dcsyfma/XC2/Q2DBL5SBBiIkkFcFHmzDBIPl4HsENXw==", + "dependencies": { + "@astro-community/astro-embed-utils": "^0.1.0" + }, + "peerDependencies": { + "astro": "^2.0.0 || ^3.0.0-beta || ^4.0.0-beta" + } + }, + "node_modules/@astro-community/astro-embed-utils": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@astro-community/astro-embed-utils/-/astro-embed-utils-0.1.2.tgz", + "integrity": "sha512-BO5k8pDfbrTXcAvMlBak+K3p8IFcsGimdLPmiRz7HIMBuy9hI6R9PEuVhJs00sCp/rkkkZbwiw3IL8ncFfxRFw==", + "dependencies": { + "linkedom": "^0.14.26" + } + }, + "node_modules/@astro-community/astro-embed-vimeo": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/@astro-community/astro-embed-vimeo/-/astro-embed-vimeo-0.3.7.tgz", + "integrity": "sha512-0Y08IOudqSLC/RKiYZagaG/uvfblSt7of+hrIcRky7u+KZK3VrTbZ/Np+nIq81jXLGJQPXN8TNGsOUsY0mw9lw==", + "dependencies": { + "@astro-community/astro-embed-utils": "^0.1.2" + }, + "peerDependencies": { + "astro": "^2.0.0 || ^3.0.0-beta || ^4.0.0-beta" + } + }, "node_modules/@astro-community/astro-embed-youtube": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/@astro-community/astro-embed-youtube/-/astro-embed-youtube-0.5.2.tgz", @@ -3101,6 +3161,44 @@ "sharp": "^0.32.6" } }, + "node_modules/astro-auto-import": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/astro-auto-import/-/astro-auto-import-0.4.2.tgz", + "integrity": "sha512-ZgWZQ58+EhbEym1+aoUnNyECOy0wsG5uRUs+rVp/7BzHtj1V76J2qkhjaTWLplgNb+8WrzhvTQNxytmXRCW+Ow==", + "dependencies": { + "@types/node": "^18.0.0", + "acorn": "^8.8.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "astro": "^2.0.0 || ^3.0.0-beta || ^4.0.0-beta" + } + }, + "node_modules/astro-auto-import/node_modules/@types/node": { + "version": "18.19.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.31.tgz", + "integrity": "sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/astro-embed": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/astro-embed/-/astro-embed-0.7.1.tgz", + "integrity": "sha512-3G7RGVjTCB3iYc2POz7mCW4R5RoO6kCAZDcFkzU1/ewAY3bKqwhHCzKrBgzQhIRA5qjn5NyAfqPy0mYcs9DQ4A==", + "dependencies": { + "@astro-community/astro-embed-integration": "^0.7.0", + "@astro-community/astro-embed-link-preview": "^0.1.0", + "@astro-community/astro-embed-twitter": "^0.5.4", + "@astro-community/astro-embed-vimeo": "^0.3.7", + "@astro-community/astro-embed-youtube": "^0.5.0" + }, + "peerDependencies": { + "astro": "^2.0.0 || ^3.0.0-beta || ^4.0.0-beta" + } + }, "node_modules/astro-eslint-parser": { "version": "0.17.0", "dev": true, @@ -4013,6 +4111,11 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/css-selector-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.4.1.tgz", + "integrity": "sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g==" + }, "node_modules/css-tree": { "version": "2.2.1", "license": "MIT", @@ -4056,6 +4159,11 @@ "npm": ">=7.0.0" } }, + "node_modules/cssom": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==" + }, "node_modules/damerau-levenshtein": { "version": "1.0.8", "dev": true, @@ -7150,6 +7258,18 @@ "dev": true, "license": "MIT" }, + "node_modules/linkedom": { + "version": "0.14.26", + "resolved": "https://registry.npmjs.org/linkedom/-/linkedom-0.14.26.tgz", + "integrity": "sha512-mK6TrydfFA7phrnp+1j57ycBwFI5bGSW6YXlw9acHoqF+mP/y+FooEYYyniOt5Ot57FSKB3iwmnuQ1UUyNLm5A==", + "dependencies": { + "css-select": "^5.1.0", + "cssom": "^0.5.0", + "html-escaper": "^3.0.3", + "htmlparser2": "^8.0.1", + "uhyphen": "^0.2.0" + } + }, "node_modules/lite-youtube-embed": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/lite-youtube-embed/-/lite-youtube-embed-0.3.2.tgz", @@ -11595,6 +11715,11 @@ "version": "1.5.3", "license": "MIT" }, + "node_modules/uhyphen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/uhyphen/-/uhyphen-0.2.0.tgz", + "integrity": "sha512-qz3o9CHXmJJPGBdqzab7qAYuW8kQGKNEuoHFYrBwV6hWIMcpAmxDLXojcHfFr9US1Pe6zUswEIJIbLI610fuqA==" + }, "node_modules/unbox-primitive": { "version": "1.0.2", "dev": true, @@ -11712,6 +11837,26 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/unist-util-select": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-4.0.3.tgz", + "integrity": "sha512-1074+K9VyR3NyUz3lgNtHKm7ln+jSZXtLJM4E22uVuoFn88a/Go2pX8dusrt/W+KWH1ncn8jcd8uCQuvXb/fXA==", + "dependencies": { + "@types/unist": "^2.0.0", + "css-selector-parser": "^1.0.0", + "nth-check": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-select/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, "node_modules/unist-util-stringify-position": { "version": "4.0.0", "license": "MIT", diff --git a/package.json b/package.json index 72cb58e..263d214 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@onwidget/astrowind", - "version": "1.0.0-beta.27", + "version": "1.0.0-beta.28", "description": "AstroWind: A free template using Astro 4.0 and Tailwind CSS. Astro starter theme.", "type": "module", "private": true, @@ -17,13 +17,13 @@ "lint:eslint": "eslint ." }, "dependencies": { - "@astro-community/astro-embed-youtube": "^0.5.2", "@astrojs/rss": "^4.0.5", "@astrojs/sitemap": "^3.1.2", "@astrolib/analytics": "^0.5.0", "@astrolib/seo": "^1.0.0-beta.5", "@fontsource-variable/inter": "^5.0.17", "astro": "^4.6.1", + "astro-embed": "^0.7.1", "astro-icon": "^1.1.0", "limax": "4.1.0", "lodash.merge": "^4.6.2", diff --git a/src/components/blog/SinglePost.astro b/src/components/blog/SinglePost.astro index 7bb52fc..9c181d2 100644 --- a/src/components/blog/SinglePost.astro +++ b/src/components/blog/SinglePost.astro @@ -88,9 +88,9 @@ const { Content } = post; }
- {Content ? : } +
diff --git a/src/content/post/markdown-elements-demo-post.mdx b/src/content/post/markdown-elements-demo-post.mdx index 559d54b..447b08d 100644 --- a/src/content/post/markdown-elements-demo-post.mdx +++ b/src/content/post/markdown-elements-demo-post.mdx @@ -9,6 +9,7 @@ tags: --- import Logo from '~/components/Logo.astro'; +import { YouTube, Tweet, Vimeo } from 'astro-embed'; Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. @@ -186,4 +187,18 @@ import Logo from "~/components/Logo.astro";
-[[Top]](#top) +## Astro Embed + +### Youtube + + + +### Tweet + + + +### Vimeo + + + +[[Top]](#top) \ No newline at end of file diff --git a/src/pages/[...blog]/index.astro b/src/pages/[...blog]/index.astro index ffeedcb..2e78ce2 100644 --- a/src/pages/[...blog]/index.astro +++ b/src/pages/[...blog]/index.astro @@ -44,7 +44,9 @@ const metadata = merge( --- - + + {post.Content ? : } + diff --git a/src/pages/homes/startup.astro b/src/pages/homes/startup.astro index 0aea545..340b956 100644 --- a/src/pages/homes/startup.astro +++ b/src/pages/homes/startup.astro @@ -11,7 +11,7 @@ import Features3 from '~/components/widgets/Features3.astro'; import FAQs from '~/components/widgets/FAQs.astro'; import Brands from '~/components/widgets/Brands.astro'; -import { YouTube } from '@astro-community/astro-embed-youtube'; +import { YouTube } from 'astro-embed'; const metadata = { title: 'Startup Landing Page',