astro/packages/astro
Ben Holmes 2675b8633c
Frontmatter injection for MD and MDX (#4176)
* feat: inject vfile data as exports

* feat: add vfile to renderMarkdown output

* feat: add safe astroExports parser to utils

* refactor: expose vite-plugin-utils on astro package

* feat: handle astroExports in mdx

* deps: vfile

* chore: lockfile

* test: astroExports in mdx

* refactor: merge plugin exports into forntmatter

* refactor: astroExports -> astro.frontmatter

* refactor: md astroExports -> astro.frontmatter

* feat: astro.frontmatter vite-plugin-markdown

* chore: remove unused import

* fix: inline safelyGetAstroData in MDX integration

* chore: check that frontmatter export is valid export name

* chore: error log naming

* test: mdx remark frontmatter injection

* fix: inconsistent shiki mod resolution

* fix: add new frontmatter and heading props

* test: remark vdata

* fix: spread astro.data.frontmatter

* test deps: mdast-util-to-string, reading-time

* fix: astro-md test package name

* test: md frontmatter injection

* fix: layouts

* deps: remove vite-plugin-utils export

* fix: package lock

* chore: remove dup import

* chore: changeset

* chore: add comment on safelyGetAstroData source

* deps: move mdast-util-to-string + reading-time to test fixture

* chore: move remark plugins to test fixture

* fix: override plugin frontmatter with user frontmatter

* test: md injected frontmatter overrides

* test: frontmatter injection overrides mdx
2022-08-05 18:55:38 -05:00
..
components Move the Markdown component to its own package (#3986) 2022-07-20 16:45:05 -04:00
e2e Add mdx extension to tailwind content glob. (#4063) 2022-08-03 14:04:44 -05:00
src Frontmatter injection for MD and MDX (#4176) 2022-08-05 18:55:38 -05:00
test Frontmatter injection for MD and MDX (#4176) 2022-08-05 18:55:38 -05:00
astro-jsx.d.ts [ci] format 2022-07-25 15:12:45 +00:00
astro.js Roll back supported Node engines (#3937) 2022-07-15 08:15:04 -04:00
CHANGELOG.md [ci] release (#4152) 2022-08-04 12:21:38 -04:00
client-base.d.ts Fixes type definitions @astrojs/image and adds more documentation to the README (#4045) 2022-07-27 15:39:05 +00:00
client.d.ts Fixes type definitions @astrojs/image and adds more documentation to the README (#4045) 2022-07-27 15:39:05 +00:00
config.d.ts Add getViteConfig helper (#4154) 2022-08-05 14:41:01 -05:00
config.mjs [ci] format 2022-08-05 19:42:58 +00:00
env.d.ts Rename Markdown util getHeaders() to getHeadings() (#4031) 2022-07-23 17:23:15 -05:00
package.json Update compiler version (#4175) 2022-08-05 17:41:35 -04:00
playwright.config.js [ci] format 2022-07-19 21:49:29 +00:00
README.md fix link (#4070) 2022-07-28 08:11:37 -04:00
tsconfig.json Move client types into Astro (#3851) 2022-07-11 08:12:18 -04:00


Astro logo

Astro is a website build tool for the modern web —
powerful developer experience meets lightweight output.

Install

# Recommended!
npm create astro@latest

# Manual:
npm install --save-dev astro

Looking for help? Start with our Getting Started guide.

Looking for quick examples? Open a starter project right in your browser.

Documentation

Visit our offical documentation.

Support

Having trouble? Get help in the official Astro Discord.

Contributing

New contributors welcome! Check out our Contributors Guide for help getting started.

Join us on Discord to meet other maintainers. We'll help you get your first contribution in no time!

Sponsors

Astro is generously supported by Netlify, Vercel, and several other amazing organizations listed here.

❤️ Sponsor Astro! ❤️