You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an [internal reference-style link][].
[internal reference-style link]: /path/to/page/
Should be rendered as a link with the pathPrefix prepended to the destination when creating the static builds for staging and production.
馃槸 Current Behavior
Staging and production builds do not prepend the link destination with the site's pathPrefix.
This can be seen when building content that uses reference-style links and publish to staging.
The link paths from this content will not have the prefix prepended to the href.
馃拋 Possible Solution
Add the remark-inline-links plugin to the MDX plugin's options.remarkPlugins array.
This transforms reference-style links in the underlying markdown into inline links, which produce the correct links in static builds.
馃敠 Context
The markdown content I am migrating into this framework almost exclusively uses reference-style links, which is valid markdown syntax.
Using this format makes authoring, reading, and reviewing the raw markdown easier.
For local development builds, this is not a problem because pathPrefix is not used, but when uploading static builds to the staging server where the content does not sit at the root, this becomes an issue.
馃捇 Examples
For Magento Cloud specific deployment instructions, see the [Magento Cloud deployment][] tutorial.
[magento cloud deployment]: /tutorials/production-deployment/magento-cloud/
馃Б Your Company/Team
Magento/devdocs
馃巵 Tracking Ticket (optional)
The text was updated successfully, but these errors were encountered:
馃檵 Feature Request
Add support for reference-style links in MDX for static builds.
馃 Expected Behavior
The following markdown:
Should be rendered as a link with the
pathPrefix
prepended to the destination when creating the static builds for staging and production.馃槸 Current Behavior
Staging and production builds do not prepend the link destination with the site's
pathPrefix
.This can be seen when building content that uses reference-style links and publish to staging.
The link paths from this content will not have the prefix prepended to the
href
.馃拋 Possible Solution
Add the remark-inline-links plugin to the MDX plugin's
options.remarkPlugins
array.{ resolve: `gatsby-plugin-mdx`, options: { extensions: [`.mdx`, `.md`], defaultLayouts: { default: require.resolve(`./src/components/MDXFilter/index.js`) }, rehypePlugins: [require(`rehype-slug`)], plugins: [`gatsby-remark-copy-linked-files`, `gatsby-remark-images-remote`], gatsbyRemarkPlugins: [ { resolve: `gatsby-remark-copy-linked-files`, options: { ignoreFileExtensions: [`png`, `jpg`, `jpeg`, `bmp`, `tiff`, `md`, `mdx`] } }, { resolve: `gatsby-remark-images-remote`, options: { maxWidth: LARGE_SCREEN_WIDTH, linkImagesToOriginal: false, withWebp: { quality: 80 }, disableBgImage: true, backgroundColor: 'none' } } ], + remarkPlugins: [require('remark-inline-links')], } },
This transforms reference-style links in the underlying markdown into inline links, which produce the correct links in static builds.
馃敠 Context
The markdown content I am migrating into this framework almost exclusively uses reference-style links, which is valid markdown syntax.
Using this format makes authoring, reading, and reviewing the raw markdown easier.
For local development builds, this is not a problem because pathPrefix is not used, but when uploading static builds to the staging server where the content does not sit at the root, this becomes an issue.
馃捇 Examples
馃Б Your Company/Team
Magento/devdocs
馃巵 Tracking Ticket (optional)
The text was updated successfully, but these errors were encountered: