Skip to content

Commit

Permalink
MDXv2: update example using-mdx (#36009)
Browse files Browse the repository at this point in the history
* WIP

* WIP#2

* ensure loader actually picks up mdx file path and prepare query parsing

* avoid issue with false-flag query duplicates

* properly inject compiled MDX as children

* fix: chunk names now should no more exceed max file path length

* fix too long chunk names

* fix: ensure page component validation uses clear path

* fix: properly set clean path on all page component validations

* test: add unit test for chunk name shortening

* fix: improve chunk name shortening

* refactor: apply breaking changes to using-mdx

* Restore js-chunk-names.ts

* Restore index.d.ts

* Restore blog-post.js

* update example

* rename dir

* baseline

* more setup

* finish

* broken state with head api

* update

* add mdx test case

* fix head api bug

* formatting

Co-authored-by: LekoArts <lekoarts@gmail.com>
  • Loading branch information
axe312ger and LekoArts authored Jul 27, 2022
1 parent 4fecc1a commit 9f0cf9f
Show file tree
Hide file tree
Showing 30 changed files with 546 additions and 679 deletions.
2 changes: 1 addition & 1 deletion docs/docs/how-to/routing/mdx.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Add components to content using MDX
examples:
- label: Using MDX
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-MDX"
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-mdx"
---

## Introduction
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/mdx/importing-and-using-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ Here is a demo:

### Additional resources

- Follow this detailed [example on using MDX](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-MDX) to import and render components.
- Follow this detailed [example on using MDX](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-mdx) to import and render components.
60 changes: 0 additions & 60 deletions examples/using-MDX/README.md

This file was deleted.

44 changes: 0 additions & 44 deletions examples/using-MDX/gatsby-config.js

This file was deleted.

54 changes: 0 additions & 54 deletions examples/using-MDX/package.json

This file was deleted.

30 changes: 0 additions & 30 deletions examples/using-MDX/src/components/image.js

This file was deleted.

Binary file removed examples/using-MDX/src/images/gatsby-icon.png
Binary file not shown.
Loading

0 comments on commit 9f0cf9f

Please sign in to comment.