The web framework that scales with you — Build fast content sites, powerful web applications, dynamic server APIs, and everything in-between ️ Star to support our work!
Find a file
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
.changeset Frontmatter injection for MD and MDX (#4176) 2022-08-05 18:55:38 -05:00
.github update test coverage to include more Node and Windows tests (#4144) 2022-08-05 15:14:19 -05:00
.gitpod Gitpod - fix pnpm version error (#4120) 2022-08-02 11:09:16 -05:00
.vscode update prettier width (#2968) 2022-04-02 14:15:41 -06:00
assets new readme (#3237) 2022-05-03 17:06:04 -07:00
examples Move types to a .d.ts file inside examples projects (#4171) 2022-08-05 17:46:52 -04:00
packages Frontmatter injection for MD and MDX (#4176) 2022-08-05 18:55:38 -05:00
patches Upgrade to pnpm@7.4.1, remove patch-package (#3747) 2022-07-07 12:52:53 -05:00
scripts Add editor integrations to language integrations (#3864) 2022-07-08 17:47:01 -04:00
.editorconfig Use accessible indentation (#2253) 2021-12-22 16:11:05 -05:00
.eslintignore Enables eslint on the full repo and adds a rule for no only() tests (#3659) 2022-06-22 15:59:49 +00:00
.eslintrc.cjs [ci] format 2022-06-22 16:01:42 +00:00
.git-blame-ignore-revs Ignore big formatting commit (#3870) 2022-07-08 15:31:10 -05:00
.gitignore Inline hydration directive scripts (#3605) 2022-06-16 09:54:09 -04:00
.gitpod.Dockerfile Gitpod - fix pnpm version error (#4120) 2022-08-02 11:09:16 -05:00
.gitpod.yml logic for opening example projects (#2811) 2022-03-16 10:24:01 -05:00
.npmrc merge next into main (#2705) 2022-03-09 15:44:26 -06:00
.nvmrc Add Migration Guide to docs (#1751) 2021-11-12 07:40:49 -05:00
.prettierignore refactor(vercel): Build Output API v3 (#3216) 2022-05-11 15:10:38 -06:00
.prettierrc.json update prettier width (#2968) 2022-04-02 14:15:41 -06:00
CONTRIBUTING.md Add pnpm-merge-driver instructions (#4022) 2022-07-22 12:31:12 -05:00
LICENSE add vite to license 2022-04-24 16:42:39 -07:00
package.json Update turbo scripts (#4177) 2022-08-05 16:18:56 -05:00
pnpm-lock.yaml Frontmatter injection for MD and MDX (#4176) 2022-08-05 18:55:38 -05:00
pnpm-workspace.yaml fix format (#2736) 2022-03-08 15:20:04 -08:00
README.md Centralise community health files in .github repo (#3830) 2022-07-12 17:16:08 +02:00
STYLE_GUIDE.md Move from yarn to pnpm (#2455) 2022-03-08 15:46:11 -06:00
tsconfig.base.json Migrate to yarn monorepo (#157) 2021-04-30 16:33:35 -05:00
turbo.json [ci] format 2022-08-05 20:15:51 +00: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!

Directory

Package Release Notes
astro astro version
create-astro create-astro version
@astrojs/react astro version
@astrojs/preact astro version
@astrojs/solid-js astro version
@astrojs/svelte astro version
@astrojs/vue astro version
@astrojs/lit astro version
@astrojs/deno astro version
@astrojs/netlify astro version
@astrojs/vercel astro version
@astrojs/cloudflare astro version
@astrojs/partytown astro version
@astrojs/sitemap astro version
@astrojs/tailwind astro version
@astrojs/turbolinks astro version

Several official projects are maintained outside of this repo:

Project Repository
@astrojs/compiler withastro/compiler
Astro Language Tools withastro/language-tools

Sponsors

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

❤️ Sponsor Astro! ❤️

Platinum Sponsors

NetlifyNetlify VercelVercel

Gold Sponsors

‹div›RIOTS ‹div›RIOTS StackUp Digital StackUp Digital

Sponsors

SentryQoddi App Platform