diff --git a/.changeset/moody-spies-learn.md b/.changeset/moody-spies-learn.md deleted file mode 100644 index dbd0be5395dde..0000000000000 --- a/.changeset/moody-spies-learn.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"@astrojs/markdoc": patch ---- - -Add automatic resolution for Markdoc partials. This allows you to render other Markdoc files inside of a given entry. Reference files using the `partial` tag with a `file` attribute for the relative file path: - -```md - - -{% partial file="my-partials/_diagram.mdoc" /%} - - - -## Diagram - -This partial will render inside of `post.mdoc.` - -![Diagram](./diagram.png) -``` diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index ff5fe8bcaebc5..1fc5381a8462d 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/markdoc": "^0.9.4", + "@astrojs/markdoc": "^0.9.5", "astro": "^4.5.15" } } diff --git a/packages/integrations/markdoc/CHANGELOG.md b/packages/integrations/markdoc/CHANGELOG.md index a139c78d3a105..53b68a9eb0256 100644 --- a/packages/integrations/markdoc/CHANGELOG.md +++ b/packages/integrations/markdoc/CHANGELOG.md @@ -1,5 +1,25 @@ # @astrojs/markdoc +## 0.9.5 + +### Patch Changes + +- [#10649](https://github.com/withastro/astro/pull/10649) [`90cfade88c2b9a34d8a5fe711ce329732d690409`](https://github.com/withastro/astro/commit/90cfade88c2b9a34d8a5fe711ce329732d690409) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Add automatic resolution for Markdoc partials. This allows you to render other Markdoc files inside of a given entry. Reference files using the `partial` tag with a `file` attribute for the relative file path: + + ```md + + + {% partial file="my-partials/_diagram.mdoc" /%} + + + + ## Diagram + + This partial will render inside of `post.mdoc.` + + ![Diagram](./diagram.png) + ``` + ## 0.9.4 ### Patch Changes diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index ba6c7b3604172..d67001e75ce19 100644 --- a/packages/integrations/markdoc/package.json +++ b/packages/integrations/markdoc/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/markdoc", "description": "Add support for Markdoc in your Astro site", - "version": "0.9.4", + "version": "0.9.5", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/astro.config.mjs b/packages/integrations/markdoc/test/fixtures/render-with-components/astro.config.mjs index a5d98b0121271..3023497aa5627 100644 --- a/packages/integrations/markdoc/test/fixtures/render-with-components/astro.config.mjs +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/astro.config.mjs @@ -1,6 +1,6 @@ import markdoc from '@astrojs/markdoc'; -import { defineConfig } from 'astro/config'; import preact from '@astrojs/preact'; +import { defineConfig } from 'astro/config'; // https://astro.build/config export default defineConfig({ diff --git a/packages/integrations/markdoc/test/render-components.test.js b/packages/integrations/markdoc/test/render-components.test.js index 5639770ab5152..b9ac8770f7323 100644 --- a/packages/integrations/markdoc/test/render-components.test.js +++ b/packages/integrations/markdoc/test/render-components.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/packages/integrations/markdoc/test/render-indented-components.test.js b/packages/integrations/markdoc/test/render-indented-components.test.js index 60b2a4ab59942..ac47e72f91166 100644 --- a/packages/integrations/markdoc/test/render-indented-components.test.js +++ b/packages/integrations/markdoc/test/render-indented-components.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { describe, it, before, after } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import { parseHTML } from 'linkedom'; import { loadFixture } from '../../../astro/test/test-utils.js'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 212870d054b47..99bfc70f5021e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -396,7 +396,7 @@ importers: examples/with-markdoc: dependencies: '@astrojs/markdoc': - specifier: ^0.9.4 + specifier: ^0.9.5 version: link:../../packages/integrations/markdoc astro: specifier: ^4.5.15