Open aaaeka opened 1 year ago
I was using simple markdown (gatsby-transformer-remark) for writing content. But now I want to use advanced markdown (gatsby-plugin-mdx). So I decided to migrate my gatsby app from version 3 to version 5. I successfully migrated the gatsby app. But when trying to migrate remark to mdx, I'm facing critical issues like fileAbsolutePath word doesn't exist, not getting body content of the .md file with children props and not sure what to use for styling markdown content after removing dangerouslySetInnerHTML.
Also facing this issue
Invalid left-hand side in prefix operation. (1:2)
> 1 | ---
| ^
2 | title: Understanding Inline, Inline-Block, and Block Elements in HTML
3 | description: Unlock the secrets of inline, inline-block, and block elements in HTML
4 | date: 2023-07-02
Preliminary Checks
Description
When creating creating a page in
gatsby-node.js
increatePages
usingcreatePage
action, if the component key in the action parameter includes...__contentFilePath=...
or is simply a url to a.mdx
file, the page appears in theonCreatePage
API.For example, creating an MDX content page like this:
Leads to the page appearing in
onCreatePage
:npm run start
output:This leads to difficult to find bugs, especially if in
onCreatePage
the actiondeletePage
is used, then no page is created, without telling the user why.Reproduction Link
https://github.com/aaaeka/gatsby-create-page-bug
Steps to Reproduce
...__contentFilePath=...
to thecreatePage
action;onCreatePage
export to see if the page appears.Expected Result
The created page should not go through
onCreatePage
.Actual Result
The created page goes through
onCreatePage
.Environment
Config Flags
No response