@astrojs/markdoc
π 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 -
Updated dependencies [
904921cbe,3669e2d27,831dfd151]:- astro@2.8.1
-
πΏ 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
-
π 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. -
Updated dependencies [
491c2db42,0a8d178c9]:- astro@2.6.3
-
π 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]:- astro@2.6.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]:- astro@2.5.7
-
πΏ 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]:- astro@2.5.6
-
π Patch Changes
-
#7178
57e65d247Thanks @bholmesdev! - Fix: revert Markdoc asset bleed changes. Production build issues were discovered that deserve a different fix. -
Updated dependencies [
904131aec,57e65d247]:- astro@2.5.5
-
π Patch Changes
-
#6758
f558a9e20Thanks @bholmesdev! - Improve style and script handling across content collection files. This addresses style bleed present in@astrojs/markdocv0.1.0 -
Updated dependencies [
f558a9e20,b41963b77]:- astro@2.5.3
-
πΏ 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 files -
Updated dependencies [
4516d7b22,e186ecc5e,c6d7ebefd,914c439bc,e9fc2c221,075eee08f,719002ca5,fc52681ba,fb84622af,cada10a46,cd410c5eb,73ec6f6c1,410428672,763ff2d1e,c1669c001,3d525efc9]:- astro@2.5.0
-
π Patch Changes
-
#7045
3a9f72c7fThanks @bholmesdev! - Improve Markdoc validation errors with full message and file preview. -
Updated dependencies [
48395c815,630f8c8ef]:- astro@2.4.4
-
π Patch Changes
πΏ 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).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();---<Contentcomponents={{ Aside }}/>
π Patch Changes
-
π 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]:- astro@2.1.7
-
π 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.
-
π Patch Changes
- #6494
a13e9d7e3Thanks @Yan-Thomas! - Consistency improvements to several package descriptions
- #6494