generated from Princesseuh/component-template
-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup duplicate README docs and update documentation links (#100)
- Loading branch information
Showing
16 changed files
with
52 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@astro-community/astro-embed-integration': patch | ||
'@astro-community/astro-embed-twitter': patch | ||
'@astro-community/astro-embed-youtube': patch | ||
'@astro-community/astro-embed-vimeo': patch | ||
'astro-embed': patch | ||
--- | ||
|
||
Simplifies README.md to link to docs site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@astro-community/astro-embed-integration': patch | ||
'@astro-community/astro-embed-twitter': patch | ||
'@astro-community/astro-embed-youtube': patch | ||
'@astro-community/astro-embed-vimeo': patch | ||
'astro-embed': patch | ||
--- | ||
|
||
Updates documentation links in `package.json` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,5 @@ | ||
# @astro-community/astro-embed-integration | ||
|
||
This is an experimental Astro integration that allows you to auto-convert URLs in MDX files to a corresponding embed component. | ||
This is an Astro integration that allows you to auto-convert URLs in MDX files to corresponding embed components. | ||
|
||
## Install | ||
|
||
```bash | ||
npm i @astro-community/astro-embed-integration | ||
``` | ||
|
||
## Usage | ||
|
||
To enable the integration, add it to the `integrations` array in your `astro.config.mjs` file: | ||
|
||
```js | ||
import { defineConfig } from 'astro/config'; | ||
import mdx from '@astrojs/mdx'; | ||
import embeds from '@astro-community/astro-embed-integration'; | ||
|
||
export default defineConfig({ | ||
integrations: [embeds(), mdx()], | ||
}); | ||
``` | ||
|
||
With the integration enabled, any isolated URL in an MDX file that matches one of the `astro-embed` component types will be converted to the appropriate component. | ||
|
||
For example, MDX like this will render an optimised YouTube player component in place of the URL. | ||
|
||
```mdx | ||
I saw this cool video the other day: | ||
|
||
http://www.youtube.com/watch?v=Hoe-woAhq_k | ||
``` | ||
[See the docs for usage instructions](https://astro-embed.netlify.app/getting-started/#auto-embed-urls-in-mdx). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.