0 Commits in this Release
Could not find any commits associated with this release.
Browse Other Releases
Top Contributors in @astrojs/markdoc@0.12.0-beta.0
Could not determine top contributors for this release.
Directory Browser for @astrojs/markdoc@0.12.0-beta.0
We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.
Release Notes Published
@astrojs/markdoc
0.11.5-beta.1
Patch Changes
#12075
a19530eThanks @bluwy! - Parses frontmatter ourselvesUpdated dependencies [
a19530e]:- @astrojs/markdown-remark@6.0.0-beta.2
0.11.5-beta.0
Patch Changes
- Updated dependencies [
5608338]:- @astrojs/markdown-remark@6.0.0-beta.1
1.0.0-alpha.1
Patch Changes
#11825
560ef15Thanks @bluwy! - Uses latest version of@astrojs/markdown-remarkwith updated Shiki APIsUpdated dependencies [
3ab3b4e,560ef15,3ab3b4e]:- @astrojs/markdown-remark@6.0.0-alpha.1
1.0.0-alpha.0
Patch Changes
0.11.5
Patch Changes
- Updated dependencies [
710a1a1]:- @astrojs/markdown-remark@5.3.0
0.11.4
Patch Changes
- #11846
ed7bbd9Thanks @HiDeoo! - Fixes an issue preventing to use Astro components as Markdoc tags and nodes when configured using theextendsproperty.
0.11.3
Patch Changes
- Updated dependencies [
49b5145]:- @astrojs/markdown-remark@5.2.0
0.11.2
Patch Changes
0.11.1
Patch Changes
- Updated dependencies [
b6afe6a,41064ce]:- @astrojs/markdown-remark@5.1.1
- @astrojs/internal-helpers@0.4.1
0.11.0
Minor Changes
Patch Changes
- #10833
8d5f3e8Thanks @renovate! - Updatesesbuilddependency to v0.20. This should not affect projects in most cases.
0.10.0
Minor Changes
#10689
683d51a5eecafbbfbfed3910a3f1fbf0b3531b99Thanks @ematipico! - Deprecate support for versions of Node.js older thanv18.17.1for Node.js 18, older thanv20.0.3for Node.js 20, and the complete Node.js v19 release line.This change is in line with Astro's Node.js support policy.
Patch Changes
- Updated dependencies [
ccafa8d230f65c9302421a0ce0a0adc5824bfd55,683d51a5eecafbbfbfed3910a3f1fbf0b3531b99]:- @astrojs/markdown-remark@5.1.0
- @astrojs/prism@3.1.0
0.9.5
Patch Changes
#10649
90cfade88c2b9a34d8a5fe711ce329732d690409Thanks @bholmesdev! - Add automatic resolution for Markdoc partials. This allows you to render other Markdoc files inside of a given entry. Reference files using thepartialtag with afileattribute for the relative file path:<!--src/content/blog/post.mdoc--> {% partial file="my-partials/_diagram.mdoc" /%} <!--src/content/blog/my-partials/_diagram.mdoc--> ## Diagram This partial will render inside of `post.mdoc.` 
0.9.4
Patch Changes
#10632
da2fb875fc58b65a21d37a3d29f570fa20b5219cThanks @bluwy! - Moves@astrojs/markdown-remarkas a dependencyUpdated dependencies [
2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de,374efcdff9625ca43309d89e3b9cfc9174351512]:- @astrojs/markdown-remark@5.0.0
0.9.3
Patch Changes
- Updated dependencies [
20463a6c1e1271d8dc3cb0ab3419ee5c72abd218]:- @astrojs/internal-helpers@0.4.0
0.9.2
Patch Changes
- Updated dependencies [
1ea0a25b94125e4f6f2ac82b42f638e22d7bdffd]:- @astrojs/internal-helpers@0.3.0
0.9.1
Patch Changes
- #10278
a548a3a99c2835c19662fc38636f92b2bda26614Thanks @Princesseuh! - Fixes original images sometimes being kept / deleted when they shouldn't in both MDX and Markdoc
0.9.0
Minor Changes
#9958
14ce8a6ebfc9daf951d2dca54737d857c229667cThanks @Princesseuh! - Adds support for using a custom tag (component) for optimized imagesStarting from this version, when a tag called
imageis used, itssrcattribute will automatically be resolved if it's a local image. Astro will pass the resultImageMetadataobject to the underlying component as thesrcprop. For non-local images (i.e. images using URLs or absolute paths), Astro will continue to pass thesrcas a string.// markdoc.config.mjs import { component, defineMarkdocConfig, nodes } from '@astrojs/markdoc/config'; export default defineMarkdocConfig({ tags: { image: { attributes: nodes.image.attributes, render: component('./src/components/MarkdocImage.astro'), }, }, });--- // src/components/MarkdocImage.astro import { Image } from 'astro:assets'; interface Props { src: ImageMetadata | string; alt: string; width: number; height: number; } const { src, alt, width, height } = Astro.props; --- <Image {src} {alt} {width} {height} />{% image src="./astro-logo.png" alt="Astro Logo" width="100" height="100" %}
0.8.3
Patch Changes
- #9643
e9a72d9a91a3741566866bcaab11172cb0dc7d31Thanks @blackmann! - Removes unnecessaryshikijidependency
0.8.2
Patch Changes
- #9479
1baf0b0d3cbd0564954c2366a7278794fad6726eThanks @sarah11918! - Updates README
0.8.1
Patch Changes
- #9452
e83b5095fThanks @florian-lefebvre! - Upgrades vite to latest
0.8.0
Minor Changes
1.0.0-beta.1
Minor Changes
1.0.0-beta.0
Patch Changes
- Updated dependencies [
abf601233,6201bbe96,cdabf6ef0,1c48ed286,37697a2c5,bd0c2e9ae,0fe3a7ed5,710be505c,153a5abb9]:
0.7.2
Patch Changes
- #9083
4537ecf0dThanks @bluwy! - Uses newcreateShikiHighlighterAPI from@astrojs/markdown-remarkto avoid code duplication
0.7.1
Patch Changes
#8759
01c801108Thanks @lutaok! - Fix build process on markdoc integration when root folder contains spaces#8762
35cd810f0Thanks @evadecker! - Upgrades Zod to 3.22.4
0.7.0
Minor Changes
- #8802
73b8d60f8Thanks @AndyClifford! - Added ignoreIndentation as a markdoc integration option to enable better readability of source code.
Patch Changes
- Updated dependencies [
26b77b8fe]:
0.6.0
Minor Changes
#8502
c4270e476Thanks @bluwy! - Updates the internalshikisyntax highlighter toshikiji, an ESM-focused alternative that simplifies bundling and maintenance.There are no new options and no changes to how you author code blocks and syntax highlighting.
Potentially breaking change: While this refactor should be transparent for most projects, the transition to
shikijinow produces a smaller HTML markup by attaching a fallbackcolorstyle to thepreorcodeelement, instead of to the linespandirectly. For example:Before:
<code class="astro-code" style="background-color: #24292e"> <pre> <span class="line" style="color: #e1e4e8">my code</span> </pre> </code>After:
<code class="astro-code" style="background-color: #24292e; color: #e1e4e8"> <pre> <span class="line">my code<span> </pre> </code>This does not affect the colors as the
spanwill inherit thecolorfrom the parent, but if you're relying on a specific HTML markup, please check your site carefully after upgrading to verify the styles.
Patch Changes
- Updated dependencies [
2993055be,c4270e476,bd5aa1cd3,f369fa250,391729686,f999365b8,b2ae9ee0c,0abff97fe,3bef32f81]:
0.5.2
Patch Changes
#8737
6f60da805Thanks @ematipico! - Add provenance statement when publishing the library from CIUpdated dependencies [
6f60da805,d78806dfe,d1c75fe15,aa265d730,78adbc443,21e0757ea,357270f2a]:- @astrojs/internal-helpers@0.2.1
- astro@3.2.3
0.5.1
Patch Changes
#8710
4c2bec681Thanks @matthewp! - Fixes View transition styles being missing when component used multiple times
0.5.0
Minor Changes
#8188
d0679a666Thanks @ematipico! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.#8179
6011d52d3Thanks @matthewp! - Astro 3.0 Release Candidate#8169
e79e3779dThanks @bluwy! - Remove pre-shiki v0.14 theme names for compatibility. Please rename to the new theme names to migrate:-
material-darker->material-theme-darker -
material-default->material-theme -
material-lighter->material-theme-lighter -
material-ocean->material-theme-ocean -
material-palenight->material-theme-palenight
-
Patch Changes
- Updated dependencies [
d0679a666,db39206cb,2aa6d8ace,adf9fccfd,0c7b42dc6,46c4c0e05,364d861bd,2484dc408,81545197a,6011d52d3,c2c71d90c,cd2d7e769,80f1494cd,e45f30293,c0de7a7b0,65c354969,3c3100851,34cb20021,a824863ab,44f7a2872,1048aca55,be6bbd2c8,9e021a91c,7511a4980,c37632a20,acf652fc1,42785c7b7,8450379db,dbc97b121,7d2f311d4,2540feedb,ea7ff5177,68efd4a8b,7bd1b86f8,036388f66,519a1c4e8,1f58a7a1b,2ae9d37f0,a8f35777e,70f34f5a3,5208a3c8f,84af8ed9d,f003e7364,ffc9e2d3d,732111cdc,0f637c71e,33b8910cf,8a5b0c1f3,148e61d24,e79e3779d,632579dc2,3674584e0,1db4e92c1,e7f872e91,16f09dfff,4477bb41c,55c10d1d5,3e834293d,96beb883a,997a0db8a,80f1494cd,0f0625504,e1ae56e72,f32d093a2,f01eb585e,b76c166bd,a87cbe400,866ed4098,767eb6866,32669cd47]:- @astrojs/prism@3.0.0
- astro@3.0.0
- @astrojs/internal-helpers@0.2.0
0.5.0-rc.1
Minor Changes
#8179
6011d52d3Thanks @matthewp! - Astro 3.0 Release Candidate#8169
e79e3779dThanks @bluwy! - Remove pre-shiki v0.14 theme names for compatibility. Please rename to the new theme names to migrate:-
material-darker->material-theme-darker -
material-default->material-theme -
material-lighter->material-theme-lighter -
material-ocean->material-theme-ocean -
material-palenight->material-theme-palenight
-
Patch Changes
- Updated dependencies [
adf9fccfd,582132328,81545197a,6011d52d3,be6bbd2c8,42785c7b7,95120efbe,2ae9d37f0,f003e7364,732111cdc,33b8910cf,e79e3779d,179796405,a87cbe400,767eb6866]:- astro@3.0.0-rc.5
- @astrojs/prism@3.0.0-rc.1
- @astrojs/internal-helpers@0.2.0-rc.2
1.0.0-beta.1
Patch Changes
- Updated dependencies [
2aa6d8ace]:
1.0.0-beta.0
Minor Changes
-
1eae2e3f7Thanks @Princesseuh! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.
Patch Changes
- Updated dependencies [
1eae2e3f7,76ddef19c,9b4f70a62,3fdf509b2,2f951cd40,c022a4217,67becaa58,bc37331d8,dfc2d93e3,3dc1ca2fa,1be84dfee,35f01df79,3fdf509b2,78de801f2,59d6e569f,7723c4cc9,fb5cd6b56,631b9c410]:- @astrojs/prism@3.0.0-beta.0
- astro@3.0.0-beta.0
- @astrojs/internal-helpers@0.2.0-beta.0
0.4.4
Patch Changes
#7597
7461e82c8Thanks @alex-sherwin! - Adds an "allowHTML" Markdoc integration option.When enabled, all HTML in Markdoc files will be processed, including HTML elements within Markdoc tags and nodes.
Enable this feature in the
markdocintegration configuration:// astro.config.mjs export default defineConfig({ integrations: [markdoc({ allowHTML: true })], });
0.4.3
Patch Changes
#7706
4f6b5ae2bThanks @Princesseuh! - Fix Markdoc integration not being able to importemitESMImagefrom AstroUpdated dependencies [
72bbfac97,d401866f9,4f6b5ae2b,06c255716]:
0.4.2
Patch Changes
#7593
c135633bfThanks @bholmesdev! - Add a documentation link to the configuration error hint for those migration pre-v0.4.0 config to the latest version.#7599
8df6a423cThanks @bholmesdev! - Fix hyphens in Markdoc tag names causing build failures
0.4.1
Patch Changes
#7575
30d04db98Thanks @bluwy! - Handle internal access changeUpdated dependencies [
9e5fafa2b,9e5fafa2b,9e5fafa2b,6e9c29579,9e5fafa2b,9e5fafa2b]:
0.4.0
Minor Changes
#7468
fb7af5511Thanks @bholmesdev! - Updates the Markdoc config object for rendering Astro components as tags or nodes. Rather than importing components directly, Astro includes a newcomponent()function to specify your component path. This unlocks using Astro components from npm packages and.tsfiles.Migration
Update all component imports to instead import the new
component()function and use it to render your Astro components:// markdoc.config.mjs import { defineMarkdocConfig, + component, } from '@astrojs/markdoc/config'; - import Aside from './src/components/Aside.astro'; export default defineMarkdocConfig({ tags: { aside: { render: Aside, + render: component('./src/components/Aside.astro'), } } });
Patch Changes
#7467
f6feff7a2Thanks @bholmesdev! - Restart the dev server whenever your markdoc config changes.Updated dependencies [
6dfd7081b,83016795e,d3247851f,a3928016c,2726098bc,f4fea3b02]:
0.3.3
Patch Changes
#7351
a30f2f3deThanks @bholmesdev! - Fix cloudflare build errors for a bad "./config" entrypoint and "node:crypto" getting included unexpectedly.#7341
491c2db42Thanks @bholmesdev! - Improve error message for unsupported Zod transforms from the content config.
0.3.2
Patch Changes
#7311
a11b62ee1Thanks @bholmesdev! - Fix Markdoc type errors forrenderanddefineMarkdocConfig()when using a TypeScript Markdoc config file.#7309
2a4bb23b2Thanks @bholmesdev! - Fix missing styles and scripts for components when usingdocument: { render: null }in the Markdoc config.Updated dependencies [
8034edd9e]:
0.3.1
Patch Changes
#7224
563293c5dThanks @bholmesdev! - Allow HTML comments<!--like this-->in Markdoc files.#7185
339529fc8Thanks @bholmesdev! - Bring back improved style and script handling across content collection files. This addresses bugs found in a previous release to@astrojs/markdoc.Updated dependencies [
6e27f2f6d,96ae37eb0,fea306936,5156c4f90,9e7366567,339529fc8]:
0.3.0
Minor Changes
#7244
bef3a75dbThanks @bholmesdev! - Remove the auto-generated$entryvariable for Markdoc entries. To access frontmatter as a variable, you can passentry.dataas a prop where you render your content:--- import { getEntry } from 'astro:content'; const entry = await getEntry('docs', 'why-markdoc'); const { Content } = await entry.render(); --- <Content frontmatter={entry.data} />
Patch Changes
#7187
1efaef6beThanks @bholmesdev! - Add support for syntax highlighting with Shiki. Apply to your Markdoc config using theextendsproperty:// markdoc.config.mjs import { defineMarkdocConfig } from '@astrojs/markdoc/config'; import shiki from '@astrojs/markdoc/shiki'; export default defineMarkdocConfig({ extends: [ shiki({ /** Shiki config options */ }), ], });Learn more in the
@astrojs/markdocREADME.#7209
16b836411Thanks @bholmesdev! - Add a built-in extension for syntax highlighting with Prism. Apply to your Markdoc config using theextendsproperty:// markdoc.config.mjs import { defineMarkdocConfig } from '@astrojs/markdoc/config'; import prism from '@astrojs/markdoc/prism'; export default defineMarkdocConfig({ extends: [prism()], });Learn more in the
@astrojs/markdocREADME.Updated dependencies [
8b041bf57,6c7df28ab,ee2aca80a,7851f9258,bef3a75db,52af9ad18,f5063d0a0,cf621340b,2bda7fb0b,af3c5a2e2,f2f18b440]:
0.2.3
Patch Changes
#7178
57e65d247Thanks @bholmesdev! - Fix: revert Markdoc asset bleed changes. Production build issues were discovered that deserve a different fix.
0.2.2
Patch Changes
#6758
f558a9e20Thanks @bholmesdev! - Improve style and script handling across content collection files. This addresses style bleed present in@astrojs/markdocv0.1.0
0.2.1
Patch Changes
#7141
a9e1cd7e5Thanks @bholmesdev! - Fix inconsistent Markdoc heading IDs for documents with the same headings.Updated dependencies [
72f686a68,319a0a7a0,852d59a8d,530fb9ebe,3257dd289]:
0.2.0
Minor Changes
#6850
c6d7ebefdThanks @bholmesdev! - Content collections now support data formats including JSON and YAML. You can also create relationships, or references, between collections to pull information from one collection entry into another. Learn more on our updated Content Collections docs.#7095
fb84622afThanks @bholmesdev! - Generate headingids and populate theheadingsproperty for all Markdoc files
Patch Changes
#7111
6b4fcde37Thanks @bholmesdev! - Fix: addheadingsto Markdocrender()return type.#7104
826e02890Thanks @bluwy! - Specify"files"field to only publish necessary filesUpdated dependencies [
4516d7b22,e186ecc5e,c6d7ebefd,914c439bc,e9fc2c221,075eee08f,719002ca5,fc52681ba,fb84622af,cada10a46,cd410c5eb,73ec6f6c1,410428672,763ff2d1e,c1669c001,3d525efc9]:
0.1.3
Patch Changes
#7045
3a9f72c7fThanks @bholmesdev! - Improve Markdoc validation errors with full message and file preview.
0.1.2
Patch Changes
#6932
49514e4ceThanks @bluwy! - Upgrade shiki to v0.14.1. This updates the shiki theme colors and adds the theme name to thepretag, e.g.<pre class="astro-code github-dark">.Updated dependencies [
818252acd,80e3d4d3d,3326492b9,cac4a321e,831b67cdb,49514e4ce,0883fd487]:
0.1.1
Patch Changes
#6723
73fcc7627Thanks @bholmesdev! - Fix: when usingrender: nullin your config, content is now rendered without a wrapper element.Updated dependencies [
489dd8d69,a1a4f45b5,a1108e037,8b88e4cf1,d54cbe413,4c347ab51,ff0430786,2f2e572e9,7116c021a]:
0.1.0
Minor Changes
#6653
7c439868aThanks @bholmesdev! - Simplify Markdoc configuration with a newmarkdoc.config.mjsfile. This lets you import Astro components directly to render as Markdoc tags and nodes, without the need for the previouscomponentsproperty. This new configuration also unlocks passing variables to your Markdoc from theContentcomponent (see the new docs).Migration
Move any existing Markdoc config from your
astro.configto a newmarkdoc.config.mjsfile at the root of your project. This should be applied as a default export, with the optionaldefineMarkdocConfig()helper for autocomplete in your editor.This example configures an
asideMarkdoc tag. Note that components should be imported and applied to therenderattribute directly, instead of passing the name as a string:// markdoc.config.mjs import { defineMarkdocConfig } from '@astrojs/markdoc/config'; import Aside from './src/components/Aside.astro'; export default defineMarkdocConfig({ tags: { aside: { render: Aside, }, }, });You should also remove the
componentsprop from yourContentcomponents. Since components are imported into your config directly, this is no longer needed.--- - import Aside from '../components/Aside.astro'; import { getEntryBySlug } from 'astro:content'; const entry = await getEntryBySlug('docs', 'why-markdoc'); const { Content } = await entry.render(); --- <Content - components={{ Aside }} />
Patch Changes
- Updated dependencies [
1f783e320,2e92e9aa9,adecda7d6,386336441,7c439868a,25cd3e574,4bf87c64f,fc0ed9c53]:
0.0.5
Patch Changes
#6630
cfcf2e2ffThanks @bholmesdev! - Support automatic image optimization for Markdoc images when usingexperimental.assets. You can follow our Assets guide to enable this feature in your project. Then, start using relative or aliased image sources in your Markdoc files for automatic optimization:<!--Relative paths-->  <!--Or configured aliases--> Updated dependencies [
b7194103e,cfcf2e2ff,45da39a86,7daef9a29]:
0.0.4
Patch Changes
#6588
f42f47dc6Thanks @bholmesdev! - Allow access to content collection entry information (including parsed frontmatter and the entry slug) from your Markdoc using the$entryvariable:--- title: Hello Markdoc! --- # {% $entry.data.title %}#6607
86273b588Thanks @bholmesdev! - Fix: Update Markdoc renderer internals to remove unneeded dependencies#6622
b37b86540Thanks @paulrudy! - Fix README instructions for installing Markdoc manually.
0.0.3
Patch Changes
0.0.2
Patch Changes
- #6494
a13e9d7e3Thanks @Yan-Thomas! - Consistency improvements to several package descriptions
0.0.1
Patch Changes
#6209
fec583909Thanks @bholmesdev! - Introduce the (experimental)@astrojs/markdocintegration. This unlocks Markdoc inside your Content Collections, bringing support for Astro and UI components in your content. This also improves Astro core internals to make Content Collections extensible to more file types in the future.You can install this integration using the
astro addcommand:astro add markdocRead the
@astrojs/markdocdocumentation for usage instructions, and browse the newwith-markdocstarter to try for yourself.
