Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
17 KiB
@astrojs/markdoc
0.3.0
Minor Changes
-
#7244
bef3a75db
Thanks @bholmesdev! - Remove the auto-generated$entry
variable for Markdoc entries. To access frontmatter as a variable, you can passentry.data
as 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
1efaef6be
Thanks @bholmesdev! - Add support for syntax highlighting with Shiki. Apply to your Markdoc config using theextends
property:// 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/markdoc
README. -
#7209
16b836411
Thanks @bholmesdev! - Add a built-in extension for syntax highlighting with Prism. Apply to your Markdoc config using theextends
property:// 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/markdoc
README. -
Updated dependencies [
8b041bf57
,6c7df28ab
,ee2aca80a
,7851f9258
,bef3a75db
,52af9ad18
,f5063d0a0
,cf621340b
,2bda7fb0b
,af3c5a2e2
,f2f18b440
]:- astro@2.5.6
0.2.3
Patch Changes
-
#7178
57e65d247
Thanks @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
0.2.2
Patch Changes
-
#6758
f558a9e20
Thanks @bholmesdev! - Improve style and script handling across content collection files. This addresses style bleed present in@astrojs/markdoc
v0.1.0 -
Updated dependencies [
f558a9e20
,b41963b77
]:- astro@2.5.3
0.2.1
Patch Changes
-
#7141
a9e1cd7e5
Thanks @bholmesdev! - Fix inconsistent Markdoc heading IDs for documents with the same headings. -
Updated dependencies [
72f686a68
,319a0a7a0
,852d59a8d
,530fb9ebe
,3257dd289
]:- astro@2.5.1
0.2.0
Minor Changes
-
#6850
c6d7ebefd
Thanks @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
fb84622af
Thanks @bholmesdev! - Generate headingid
s and populate theheadings
property for all Markdoc files
Patch Changes
-
#7111
6b4fcde37
Thanks @bholmesdev! - Fix: addheadings
to Markdocrender()
return type. -
#7104
826e02890
Thanks @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
0.1.3
Patch Changes
-
#7045
3a9f72c7f
Thanks @bholmesdev! - Improve Markdoc validation errors with full message and file preview. -
Updated dependencies [
48395c815
,630f8c8ef
]:- astro@2.4.4
0.1.2
Patch Changes
-
#6932
49514e4ce
Thanks @bluwy! - Upgrade shiki to v0.14.1. This updates the shiki theme colors and adds the theme name to thepre
tag, e.g.<pre class="astro-code github-dark">
. -
Updated dependencies [
818252acd
,80e3d4d3d
,3326492b9
,cac4a321e
,831b67cdb
,49514e4ce
,0883fd487
]:- astro@2.4.0
0.1.1
Patch Changes
-
#6723
73fcc7627
Thanks @bholmesdev! - Fix: when usingrender: null
in your config, content is now rendered without a wrapper element. -
Updated dependencies [
489dd8d69
,a1a4f45b5
,a1108e037
,8b88e4cf1
,d54cbe413
,4c347ab51
,ff0430786
,2f2e572e9
,7116c021a
]:- astro@2.2.0
0.1.0
Minor Changes
-
#6653
7c439868a
Thanks @bholmesdev! - Simplify Markdoc configuration with a newmarkdoc.config.mjs
file. This lets you import Astro components directly to render as Markdoc tags and nodes, without the need for the previouscomponents
property. This new configuration also unlocks passing variables to your Markdoc from theContent
component (see the new docs).Migration
Move any existing Markdoc config from your
astro.config
to a newmarkdoc.config.mjs
file 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
aside
Markdoc tag. Note that components should be imported and applied to therender
attribute 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
components
prop from yourContent
components. 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
]:- astro@2.1.8
0.0.5
Patch Changes
-
#6630
cfcf2e2ff
Thanks @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--> ![The Milky Way Galaxy](../assets/galaxy.jpg) <!--Or configured aliases--> ![Houston smiling and looking cute](~/assets/houston-smiling.jpg)
-
Updated dependencies [
b7194103e
,cfcf2e2ff
,45da39a86
,7daef9a29
]:- astro@2.1.7
0.0.4
Patch Changes
-
#6588
f42f47dc6
Thanks @bholmesdev! - Allow access to content collection entry information (including parsed frontmatter and the entry slug) from your Markdoc using the$entry
variable:--- title: Hello Markdoc! --- # {% $entry.data.title %}
-
#6607
86273b588
Thanks @bholmesdev! - Fix: Update Markdoc renderer internals to remove unneeded dependencies -
#6622
b37b86540
Thanks @paulrudy! - Fix README instructions for installing Markdoc manually.
0.0.3
Patch Changes
0.0.2
Patch Changes
- #6494
a13e9d7e3
Thanks @Yan-Thomas! - Consistency improvements to several package descriptions
0.0.1
Patch Changes
-
#6209
fec583909
Thanks @bholmesdev! - Introduce the (experimental)@astrojs/markdoc
integration. 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 add
command:astro add markdoc
Read the
@astrojs/markdoc
documentation for usage instructions, and browse the newwith-markdoc
starter to try for yourself.