Skip to content

Commit

Permalink
Move the Markdown component to its own package (#3986)
Browse files Browse the repository at this point in the history
* Move the Markdown component to its own package

* Update the examples

* Updated lockfile

* Use is:raw

* Add a main field

* Update the formatting of the readme

* Rename to @astrojs/markdown-component
  • Loading branch information
matthewp authored Jul 20, 2022
1 parent d13afad commit bccd88f
Show file tree
Hide file tree
Showing 116 changed files with 1,392 additions and 719 deletions.
22 changes: 22 additions & 0 deletions .changeset/wild-socks-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'astro': minor
'@astrojs/markdown-component': minor
---

Move the Markdown component to its own package

This change moves the Markdown component into its own package where it will be maintained separately. All that needs to change from a user's perspective is the import statement:

```astro
---
import { Markdown } from 'astro/components';
---
```

Becomes:

```astro
---
import Markdown from '@astrojs/markdown-component';
---
```
1 change: 0 additions & 1 deletion examples/with-markdown-plugins/src/layouts/main.astro
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const { content } = Astro.props;
<header>
<nav class="nav">
<a href="/">Home</a>
<a href="/about">About</a>
</nav>
</header>
<slot />
Expand Down
20 changes: 0 additions & 20 deletions examples/with-markdown-plugins/src/pages/about.astro

This file was deleted.

3 changes: 1 addition & 2 deletions examples/with-markdown-shiki/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ npm init astro -- --template with-markdown-shiki

This example showcases Astro's [built-in Markdown support](https://docs.astro.build/en/guides/markdown-content/).

- `src/pages/index.astro` uses Astro's `<Markdown>` component.
- `src/pages/other.md` is a treated as a page entrypoint and uses a `layout`.
- `src/pages/index.md` is a treated as a page entrypoint and uses a `layout`.
19 changes: 0 additions & 19 deletions examples/with-markdown/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions examples/with-markdown/.npmrc

This file was deleted.

6 changes: 0 additions & 6 deletions examples/with-markdown/.stackblitzrc

This file was deleted.

12 changes: 0 additions & 12 deletions examples/with-markdown/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions examples/with-markdown/astro.config.mjs

This file was deleted.

26 changes: 0 additions & 26 deletions examples/with-markdown/package.json

This file was deleted.

Binary file removed examples/with-markdown/public/favicon.ico
Binary file not shown.
11 changes: 0 additions & 11 deletions examples/with-markdown/sandbox.config.json

This file was deleted.

20 changes: 0 additions & 20 deletions examples/with-markdown/src/components/PreactCounter.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions examples/with-markdown/src/components/ReactCounter.jsx

This file was deleted.

22 changes: 0 additions & 22 deletions examples/with-markdown/src/components/SvelteCounter.svelte

This file was deleted.

27 changes: 0 additions & 27 deletions examples/with-markdown/src/components/VueCounter.vue

This file was deleted.

18 changes: 0 additions & 18 deletions examples/with-markdown/src/layouts/main.astro

This file was deleted.

19 changes: 0 additions & 19 deletions examples/with-markdown/src/pages/external.astro

This file was deleted.

65 changes: 0 additions & 65 deletions examples/with-markdown/src/pages/index.astro

This file was deleted.

18 changes: 0 additions & 18 deletions examples/with-markdown/src/pages/other.md

This file was deleted.

Loading

0 comments on commit bccd88f

Please sign in to comment.