summaryrefslogtreecommitdiff
path: root/examples/with-mdx/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-08-06[ci] formatGravatar FredKSchott 1-1/+1
2022-08-05Move types to a .d.ts file inside examples projects (#4171)Gravatar Erika 1-0/+1
* Move types to a .d.ts file to avoid making types explicit * Rename to proper types * Move to proper place * Add noEmit to tsconfig.json * Add back removed code by accident
2022-07-21[MDX] Add Prism and Shiki support (#4002)Gravatar Ben Holmes 1-0/+12
* deps: add rehype-prism, shiki, rehype-pretty-code * wip: apply rehype plugins depending on config * wip: cherry-pick jsx-runtime fix? * deps: rehype-pretty-code -> shiki-twoslash, add rehype-raw * wip: add jsx-runtime fix * feat: get shiki working! * deps: add @astrojs/prism, prismjs, unist-util-visit * feat: add prism support * example: add small syntax highlight demo to with-mdx * deps: remove rehype-prism * chore: remove unused async * chore: add .test.js to all mdx tests * test: shiki, shikiConfig, prism * fix: remove "is:raw" from prism output * docs: add syntax highlighting section * chore: add changeset * nit: "Shiki config" -> Shiki config Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Revert "wip: add jsx-runtime fix" This reverts commit 07f4528f449281afb7bbc154b09292244795a183. * docs: link to integration README from example Co-authored-by: Nate Moore <nate@astro.build> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-07-15Handle metadata for MDX files during build (#3915)Gravatar Nate Moore 1-1/+1
* fix: metadata handling for MDX files * chore: add changeset * chore: update mdx example * fix: protect against infinite loops in jsx-runtime, properly hook console.error * chore: remove unused import * feat(mdx): support `client:only` * fix: prefer Symbol.for * fix(jsx): handle vnode check properly * chore: appease ts Co-authored-by: Nate Moore <nate@astro.build>
2022-07-11Fix: reintroduce smoke tests across example projects (#3669)Gravatar Nate Moore 1-1/+1
* chore: update smoke tests * chore: bump smoke tests to node@16 * chore: remove gitmodules * chore(ci): prefer node@14 * wip: remove path from smoke clone step * feat: run build:examples from test:smoke * fix: remove no-frozen-lockfile * fix: checkout monorepo last for pnpm setup * wip: replace @astrojs/markdown/remark import from md * fix: remove type defs from generated file * fix: function order * chore: remove ssr-utils export * wip: remove windows from smoke test * fix: instantiate slugger in snippet * fix: exclude with-mdx from smoke (for now) * fix: add quotes on filter flag for safety * chore: changeset * wip: try reintroducing windows smoke * sad chore: remove client: directive from with-mdx * Revert "wip: try reintroducing windows smoke" This reverts commit 9529b1a45c007286c22861e106b82200545e4198. Co-authored-by: Nate Moore <nate@astro.build> Co-authored-by: bholmesdev <hey@bholmes.dev>
2022-07-01[ci] formatGravatar natemoo-re 1-3/+1
2022-07-01Update MDX example to address failure (#3799)Gravatar Nate Moore 1-3/+5
* fix: do not use symbol in JSX runtime * chore: update MDX example Co-authored-by: Nate Moore <nate@astro.build>
2022-06-30[ci] formatGravatar natemoo-re 1-10/+8
2022-06-30MDX support (#3706)Gravatar Nate Moore 3-0/+44
* feat: first pass at MDX support * fix: move built-in JSX renderer to come first * chore: remove jsx example * chore: update lockfile * chore: cleanup example * fix: missing deps * refactor: move component render logic to `renderPage` * chore: update HMR script * chore: update MDX example * refactor: prefer unshit * refactor: remove TODO comment * fix: remove duplicate identifier * refactor: cleanup mdx entrypoint * fix: better html handling * fix: add tsconfig to mdx package * chore: update lockfile * fix: do not sort plugins unless mdx is enabled * chore: update compiler * fix(hmr): maybe render head for non-Astro pages * fix: set initial pageExtensions * refactor: cleanup addPageExtension * refactor: remove addPageExtensions from types * refactor: expose HookParameters type * fix: only default to astro for MDX * test: pick up jsx support in test fixtures * refactor: simplify mdx entrypoint * test: add basic MDX tests * test(e2e): add mdx + framework tests * chore: update lockfile * test(e2e): fix preact mdx e2e test * fix(mdx): disable .md support * test(e2e): fix vue-component test missing mdx * test(e2e): fix solid component needing import * fix: allow `client:only="solid"` as an alias to `solid-js` * chore: move to with-mdx example * chore: update MDX readme * chore: update example readme * chore: bump astro version * chore: update lockfile * Update mod.d.ts * feat: support `export const components` in MDX pages * chore: update mdx example * fix: update jsx-runtime with better slot support * refactor: remove object style support * chore: cleanup package exports * chore: add todo comment * refactor: improve isPage function, move to utils * refactor: dry up manual HMR updates * chore: add dev tests for MDX * chore: prefer set to array * chore: add changesets * fix(hmr): flip public/private route Co-authored-by: Nate Moore <nate@astro.build>