Skip to content
Open

V1 #1

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
c5d44fb
v1.6.4
johno May 20, 2020
264b40a
Update gatsby monorepo (#1064)
renovate[bot] May 21, 2020
5fa7d4b
Update dependency @reach/skip-nav to v0.10.3 (#1086)
renovate[bot] May 29, 2020
3fac5f5
Update dependency @pkgr/rollup to v0.10.4 (#1085)
renovate[bot] May 29, 2020
3258dcf
Pin dependencies (#1055)
renovate[bot] May 29, 2020
f91b5c1
Update yarn.lock
johno May 29, 2020
d7caf44
v1.6.5
johno May 29, 2020
7329181
Add a new homepage, because Black Lives Matter (#1094)
johno Jun 1, 2020
67d8728
Fix Tony's name
johno Jun 5, 2020
a45fbc0
Update @next/mdx repo link (#1106)
rafaelalmeidatk Jun 10, 2020
d24ea5c
Fix casing of TypeScript (#1110)
karlhorky Jun 12, 2020
fe6e3ac
fix: add useEffect to Web Components example (#1109)
Jun 12, 2020
cdeb68e
Fix npm command to start zero example (#1107)
ilhamwahabi Jun 12, 2020
ff93d0a
chore(deps): bump websocket-extensions in /examples/react-static (#1098)
dependabot[bot] Jun 15, 2020
03cf5a0
chore(deps): bump websocket-extensions in /examples/razzle (#1099)
dependabot[bot] Jun 15, 2020
78b36dc
chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 (#1100)
dependabot[bot] Jun 15, 2020
b774395
Update dependency eslint to v7.2.0 (#1092)
renovate[bot] Jun 17, 2020
e000db1
Update dependency eslint-config-xo to v0.31.0 (#1101)
renovate[bot] Jun 17, 2020
275d868
Update dependency eslint-plugin-import to v2.21.2 (#1102)
renovate[bot] Jun 17, 2020
f370ad3
chore(deps): update dependency lerna to v3.22.1 (#1112)
renovate[bot] Jun 17, 2020
9971fff
Update dependency gatsby-plugin-fathom to v1.3.0 (#1104)
renovate[bot] Jun 17, 2020
3cb7a52
Bump yarn.lock
johno Jun 17, 2020
8712d69
v1.6.6
johno Jun 17, 2020
e84dab3
docs: add a space after punctuation (#1113)
Norviah Jun 19, 2020
6df239e
Use blm banner
johno Jun 19, 2020
4f90047
Fixed broken links (#1118)
ykadosh Jun 24, 2020
8ea38c6
Fixed links and improved example (#1119)
mariusGundersen Jun 29, 2020
e357c50
ci: Github CI Fixes (#1134)
palfrey Jul 10, 2020
d05a571
docs: `yarn bootstrap` should be removed in favor of yarn workspaces …
JounQin Jul 11, 2020
8f50ce5
Adding favicon based on MDX logo to docs (#1141)
gdgkirkley Jul 12, 2020
8df5ffd
Introduce syntax highlighting (#1140)
samrobbins85 Jul 13, 2020
687aae1
chore: upgrade eslint-plugin-mdx, fix lint issue (#1147)
JounQin Jul 15, 2020
94fc30c
chore(deps): update dependency yarn-deduplicate to v2.1.1 (#1146)
renovate[bot] Jul 15, 2020
ba1f32b
chore(deps): update dependency eslint-plugin-prettier to v3.1.4 (#1111)
renovate[bot] Jul 15, 2020
f2e595b
chore(deps): update dependency typescript to v3.9.6 (#1145)
renovate[bot] Jul 15, 2020
e2c7ece
chore(deps): update dependency eslint-plugin-import to v2.22.0 (#1130)
renovate[bot] Jul 15, 2020
7be9a6f
fix(deps): update dependency @reach/skip-nav to v0.10.5 (#1123)
renovate[bot] Jul 15, 2020
ed2c7d2
fix(deps): update dependency @reach/router to v1.3.4 (#1122)
renovate[bot] Jul 15, 2020
9b388fa
chore(deps): update dependency eslint-plugin-react to v7.20.3 (#1131)
renovate[bot] Jul 15, 2020
3592a57
chore(deps): update dependency preact-render-to-string to v5.1.10(#1144)
renovate[bot] Jul 15, 2020
0e39e86
Typescript support (#1128)
deadcoder0904 Jul 15, 2020
dbfaee2
fix: quote component name in error message (#1136)
kaisugi Jul 15, 2020
e8d97b9
v1.6.7
johno Jul 15, 2020
27e297a
chore(deps): bump lodash from 4.17.15 to 4.17.19 in /examples/razzle …
dependabot[bot] Jul 16, 2020
8844d1d
chore(deps): bump lodash in /examples/react-static (#1149)
dependabot[bot] Jul 16, 2020
ace2bb4
docs: add spaces after sentences in index (#1127)
AndersDJohnson Jul 16, 2020
069d38b
Pass filename to Babel transform for better errors (#1126)
silvenon Jul 16, 2020
cb176ae
Bump all deps, adjust core-js version (#1151)
johno Jul 16, 2020
afe24bf
v1.6.8
johno Jul 16, 2020
caae096
Default file to an object (#1154)
johno Jul 16, 2020
4973c50
v1.6.9
johno Jul 16, 2020
08c7097
Ensure all falsy values for file are addressed (#1155)
johno Jul 17, 2020
ad198c8
v1.6.10
johno Jul 17, 2020
5af3e1a
fix: `options.file` could be `undefined` error in `toJSX` (#1156)
dusave Jul 17, 2020
727cd47
v1.6.11
silvenon Jul 17, 2020
d90e4a3
Fix release instructions in contributing docs (#1158)
Jul 17, 2020
c493a7f
Fix duplicate yarn in instructions (#1159)
Jul 17, 2020
9f4cec5
chore(repo): pin internal package dependencies (#1157)
peter-mouland Jul 20, 2020
f3d4e64
v1.6.12
johno Jul 20, 2020
9ef1da2
pin workspace deps to prevent mis-matched versions when updates are r…
peter-mouland Jul 20, 2020
1897798
Pin internal deps, related to #1167 (#1168)
johno Jul 20, 2020
57998ae
v1.6.13
johno Jul 20, 2020
bb3ac57
Update dependency eslint to v7.5.0 (#1162)
renovate[bot] Jul 22, 2020
80a110c
Update dependency eslint-config-xo to v0.32.1 (#1163)
renovate[bot] Jul 22, 2020
c164f51
Update dependency typescript to v3.9.7 (#1164)
renovate[bot] Jul 22, 2020
e13f6a0
Update gatsby monorepo (#1165)
renovate[bot] Jul 22, 2020
4b3df75
Update remark monorepo (#1166)
renovate[bot] Jul 22, 2020
4a874ed
Improve runtime docs, closes #1176 (#1177)
johno Jul 22, 2020
a263b2a
Bump yarn.lock
johno Jul 22, 2020
6b40f80
v1.6.14
johno Jul 22, 2020
a966563
Update sponsors table (#1183)
wooorm Jul 24, 2020
ebad09a
Update social icons with react-feather (#1191)
maxcell Jul 28, 2020
5cf956e
Update dependency prettier-plugin-pkg to v0.8.0 (#1185)
renovate[bot] Jul 29, 2020
e857a66
Update dependency unified to v9.1.0 (#1186)
renovate[bot] Jul 29, 2020
dec4fd5
Update dependency webpack to v4.44.0 (#1187)
renovate[bot] Jul 29, 2020
5026f84
Update gatsby monorepo (#1188)
renovate[bot] Jul 29, 2020
17a06f7
Fix dirty yarn.lock
johno Jul 29, 2020
30e5688
v1.6.15
johno Jul 29, 2020
3b8fc43
Make short codes function conditional. (#1088)
ankeetmaini Jul 29, 2020
56b3f19
v1.6.16
johno Jul 29, 2020
3831e89
Commit dirty yarn.lock
johno Jul 29, 2020
8f727dd
chore(deps): bump elliptic from 6.5.2 to 6.5.3 in /examples/razzle (#…
dependabot[bot] Jul 29, 2020
af2bd4a
chore(deps): bump elliptic from 6.4.1 to 6.5.3 in /examples/react-sta…
dependabot[bot] Jul 29, 2020
82298be
MDXConf landing page and signup form (#1200)
johno Jul 31, 2020
3ecb138
OG/Twitter preview (#1201)
johno Jul 31, 2020
fb9503c
Fix og image url (#1203)
johno Jul 31, 2020
d79bfbf
Tweak confirmed page and conf heading for mobile
johno Jul 31, 2020
f134605
Add details on how to add MDX plugins with Next.js (#1212)
samrobbins85 Aug 3, 2020
e8c2c28
Pin dependency @theme-ui/components to 0.3.1 (#1206)
renovate[bot] Aug 5, 2020
e5d7e4b
Update babel monorepo (#1207)
renovate[bot] Aug 5, 2020
bf60ee4
Update dependency @pkgr/rollup to v0.10.5 (#1208)
renovate[bot] Aug 5, 2020
bbe9cd0
Update dependency eslint to v7.6.0 (#1209)
renovate[bot] Aug 5, 2020
220b27d
fix: include remark-frontmatter manually (#1204)
JounQin Aug 5, 2020
2c25cc5
chore(deps): pin dependency remark-frontmatter to 2.0.0 (#1214)
renovate[bot] Aug 10, 2020
57200f3
chore(deps): update dependency eslint-plugin-mdx to v1.8.1 (#1215)
renovate[bot] Aug 10, 2020
26d379d
chore(deps): update dependency eslint-plugin-react to v7.20.5 (#1216)
renovate[bot] Aug 10, 2020
7dcda9f
chore(deps): update dependency jest to v26.3.0 (#1217)
renovate[bot] Aug 10, 2020
60044c1
docs(getting-started/gatsby): Update gatsby link (#1224)
Biswas-N Aug 19, 2020
4e4ee24
Add MDXConf banner (#1225)
johno Aug 19, 2020
42bd64a
Update conf page with speaker list and time
johno Aug 22, 2020
239877f
Add Jonathan
johno Aug 22, 2020
d0e87be
Update Jonathan's talk title
johno Aug 22, 2020
46432c6
Add conf links
johno Aug 24, 2020
715c19a
Tweak theme and title
johno Aug 24, 2020
1b45da8
Add more description
johno Aug 24, 2020
e3a7ea5
Add stream recording link
johno Aug 24, 2020
2a8fc47
Fix typo
johno Aug 24, 2020
c0a3fcc
Add recordings
johno Aug 24, 2020
b204ee2
Improve wording
johno Aug 24, 2020
df9bd41
Use singular noun (#1259)
chenxsan Sep 8, 2020
61c1250
fix code block syntax (#1260)
chenxsan Sep 8, 2020
7a0b29a
fix edit link (#1261)
chenxsan Sep 8, 2020
86b5099
JetBrains plugin now available (#1252)
andrewaylett Sep 8, 2020
25b9fe4
Update projects.mdx (#1248)
nikobenho Sep 8, 2020
b211826
add temporary hack for getting .mjs builds for node v14 (#1266)
ChristopherBiscardi Sep 14, 2020
42ec1c3
v1.6.17
johno Sep 14, 2020
e1289c0
Bump build tool deps
johno Sep 17, 2020
f3c283b
Bump lib and example deps
johno Sep 17, 2020
a9dd570
v1.6.18
johno Sep 17, 2020
737a6b6
chore(deps): bump http-proxy from 1.18.0 to 1.18.1 in /examples/razzl…
dependabot[bot] Sep 17, 2020
7e3d4a2
chore(deps): bump http-proxy in /examples/react-static (#1262)
dependabot[bot] Sep 17, 2020
6d2bd0c
fix(docs): fix link (#1235)
muescha Sep 17, 2020
b1bb8a5
Health (#1226)
wooorm Sep 17, 2020
31e2b75
Add info on making Next.js pick up .mdx pages (#1250)
dan-overton Sep 17, 2020
3f8b408
Fix Lerna links (#1286)
ndresx Oct 2, 2020
c59815c
Update math-blocks.mdx (#1278)
samrobbins85 Oct 11, 2020
705ff22
Update sponsors
wooorm Oct 18, 2020
92cbd91
Add annotation to use classic runtime (#1307)
ykzts Oct 20, 2020
fb32e85
Runtime - Added documentation for remarkPlugins (#1218)
dowi Oct 20, 2020
baaaa4a
Update snapshots
johno Oct 20, 2020
f5682fa
v1.6.19
johno Oct 20, 2020
d0fac2b
Fix broken link in `plugins.mdx`
MichaelDeBoey Oct 29, 2020
d38ee9e
Support react 17 peer dep (#1319)
bcomnes Nov 7, 2020
89b96b1
v1.6.20
johno Nov 7, 2020
4f60c64
chore(deps): update dependency preact to v10.5.5 (#1246)
renovate[bot] Nov 7, 2020
b19f450
chore(deps): update dependency typescript to v4.0.5 (#1272)
renovate[bot] Nov 7, 2020
9671434
chore(deps): update dependency webpack to v4.44.2 (#1273)
renovate[bot] Nov 7, 2020
3a337ae
Update math-blocks.mdx with Gastby implementation. (#1241)
jackpeplinski Nov 7, 2020
50f6d53
chore(deps): update dependency @vue/babel-preset-jsx to v1.2.4 (#1302)
renovate[bot] Nov 7, 2020
c446d74
Update dependency lint-staged to v10.5.1 (#1304)
renovate[bot] Nov 7, 2020
ba02320
fix(deps): update dependency mdast-util-to-hast to v9.1.2 (#1275)
renovate[bot] Nov 7, 2020
acd4035
Update dependency jest to v26.6.3 (#1291)
renovate[bot] Nov 7, 2020
fb254b9
Update gatsby monorepo (#1274)
renovate[bot] Nov 7, 2020
1fc8455
v1.6.21
johno Nov 7, 2020
fb5936d
Update `typescript.mdx`
gamliela Nov 11, 2020
27e3f3e
Fix `delete` -> `del` in docs on typescript
freeshineit Nov 18, 2020
56bc2b2
Correct descriptions/tags in Table of components (#1331)
mrm007 Nov 30, 2020
d605f2f
fix(deps): update dependency gatsby-plugin-theme-ui to v0.3.4 (#1337)
renovate[bot] Nov 30, 2020
c14a3c5
fix(deps): update dependency detab to v2.0.4 (#1336)
renovate[bot] Nov 30, 2020
adb0a93
fix(deps): update dependency @theme-ui/components to v0.3.4 (#1335)
renovate[bot] Nov 30, 2020
04e694a
chore(deps): update dependency preact to v10.5.7 (#1334)
renovate[bot] Nov 30, 2020
5bff44e
fix(deps): update dependency @emotion/core to v10.1.1 (#1324)
renovate[bot] Nov 30, 2020
86f4f3f
Add MDNEXT to projects page (#1309)
domitriusclark Nov 30, 2020
9f12f1e
Add mdnext link
johno Nov 30, 2020
61dde73
chore(deps): update dependency yarn-deduplicate to v3.1.0 (#1323)
renovate[bot] Nov 30, 2020
e4efd00
chore(deps): update dependency hast-util-select to v4.0.1 (#1322)
renovate[bot] Nov 30, 2020
ef9e957
chore(deps): update dependency remark-preset-wooorm to v8 (#1306)
renovate[bot] Nov 30, 2020
145e259
chore(deps): update babel monorepo (#1301)
renovate[bot] Nov 30, 2020
0dfc589
chore(deps): update dependency @vue/test-utils to v1.1.1 (#1321)
renovate[bot] Nov 30, 2020
9ab2ead
chore(deps): update dependency eslint-config-xo to v0.33.1 (#1303)
renovate[bot] Nov 30, 2020
805179b
chore(deps): update dependency eslint to v7.14.0 (#1281)
renovate[bot] Nov 30, 2020
5e5b58c
chore(deps): update dependency eslint-plugin-import to v2.22.1 (#1287)
renovate[bot] Nov 30, 2020
59554d6
fix(deps): update dependency mdast-util-to-hast to v10 (#1293)
renovate[bot] Nov 30, 2020
b90fc5d
chore(deps): update dependency preact-render-to-string to v5.1.12 (#1…
renovate[bot] Nov 30, 2020
f6c81d4
chore(deps): update dependency eslint-config-prettier to v6.15.0 (#1282)
renovate[bot] Dec 1, 2020
5044948
chore(deps): update dependency eslint-plugin-react to v7.21.5 (#1288)
renovate[bot] Dec 1, 2020
2dabd71
v1.6.22
johno Dec 1, 2020
a10d501
Fix typo
chenxsan Dec 15, 2020
6b00a37
Update companies for johno and jxn (#1387)
johno Dec 16, 2020
f76b7cd
fix(docs): correct typos in Vue docs
emmiep Dec 28, 2020
3624ab8
Fix typo in Contributing
lachlanjc Jan 4, 2021
15f4c61
Fixed YouTube property name videoId (#1438)
klokie Feb 25, 2021
8cc7ba7
build: fix docs build step, migrate now.sh to vercel (#1471)
JounQin Mar 2, 2021
c00ffce
docs: add next-mdx to projects (#1515)
shadcn Apr 8, 2021
1cea299
Update live-code.mdx (#1523)
adrfoong May 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ overrides:
extends:
- plugin:mdx/recommended
- plugin:mdx/overrides
globals:
Speaker: false
SpeakerList: false
rules:
import/no-extraneous-dependencies: 0
no-warning-comments: 0

- files:
- '**/test/**/*.js'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ artifacts
.*cache
public
.npmrc
.nyc_output
coverage
1 change: 1 addition & 0 deletions .remarkrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const wooorm = require('retext-preset-wooorm')

module.exports = {
plugins: [
'remark-frontmatter',
'./packages/remark-mdx',
'preset-wooorm',
'preset-prettier',
Expand Down
File renamed without changes.
6 changes: 2 additions & 4 deletions docs/about.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ also available on [GitHub][design].

### Authors

- [John Otander][john] ([@4lpine][4lpine]) – [Compositor][] + [Clearbit][]
- [John Otander][john] ([@4lpine][4lpine]) – [Components AI](https://components.ai)
- [Tim Neutkens][tim] ([@timneutkens][timneutkens]) – [Vercel][]
- [Guillermo Rauch][guillermo] ([@rauchg][rauchg]) – [Vercel][]
- [Brent Jackson][brent] ([@jxnblk][jxnblk]) – [Compositor][]
- [Brent Jackson][brent] ([@jxnblk][jxnblk]) – [Gatsby](https://gatsbyjs.com)

## Related

Expand Down Expand Up @@ -70,6 +70,4 @@ These projects define the syntax which MDX blends together (MD and JSX).
[timneutkens]: https://twitter.com/timneutkens
[jxnblk]: https://twitter.com/jxnblk
[evil rabbit]: https://twitter.com/evilrabbit_
[compositor]: https://compositor.io
[vercel]: https://vercel.com
[clearbit]: https://clearbit.com
4 changes: 2 additions & 2 deletions docs/advanced/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ stubbed `Button`:
const makeShortcode = name =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
"Component '" +
name +
' was not imported, exported, or provided by MDXProvider as global scope'
"' was not imported, exported, or provided by MDXProvider as global scope"
)
return <div {...props} />
}
Expand Down
6 changes: 3 additions & 3 deletions docs/advanced/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ mdx.sync(mdxText, {
[rehype]: https://github.com/rehypejs/rehype
[remark-capitalize]: https://github.com/zeit/remark-capitalize
[remark-toc]: https://github.com/remarkjs/remark-toc
[remark-plugins]: https://github.com/remarkjs/remark/blob/master/doc/plugins.md#list-of-plugins
[rehype-plugins]: https://github.com/rehypejs/rehype/blob/master/doc/plugins.md#list-of-plugins
[remark-plugins]: https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins
[rehype-plugins]: https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#list-of-plugins
[retext]: https://github.com/retextjs/retext
[remarkjs/remark#224]: https://github.com/remarkjs/remark/issues/224
[visit]: https://github.com/syntax-tree/unist-util-visit
[retext-smartypants]: https://github.com/retextjs/retext-smartypants
[create-plugin]: https://unifiedjs.com/create-a-plugin.html
[create-plugin]: https://unifiedjs.com/learn/guide/create-a-plugin
4 changes: 2 additions & 2 deletions docs/advanced/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ declare module '@mdx-js/react' {
| 'a'
| 'blockquote'
| 'code'
| 'delete'
| 'del'
| 'em'
| 'h1'
| 'h2'
Expand All @@ -39,7 +39,7 @@ declare module '@mdx-js/react' {
| 'ul'

export type Components = {
[key in ComponentType]?: React.ComponentType<{children: React.ReactNode}>
[key in ComponentType]?: React.ComponentType<any>
}

export interface MDXProviderProps {
Expand Down
2 changes: 1 addition & 1 deletion docs/blog/shortcodes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ MDX document with JSX.

Here’s a YouTube shortcode:

<YouTube tweetId="1234" />
<YouTube videoId="1234" />

Here’s a YouTube shortcode wrapped in TomatoBox:

Expand Down
15 changes: 5 additions & 10 deletions docs/contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,16 @@ prevent you from doing unnecessary work.
## Running the tests

1. `yarn`
2. `yarn bootstrap`
3. `yarn test`
2. `yarn test`

Tests for an individual package can be run as a yarn workspace:
`yarn workspace remark-mdx test`. To see what packages ar available to test
`yarn workspace remark-mdx test`. To see what packages are available to test
you can list out all workspaces with `yarn workspaces info`.

## Running the docs site

1. `yarn`
2. `yarn bootstrap`
2. `yarn build`
3. `yarn docs`

## Submitting an issue
Expand Down Expand Up @@ -127,11 +126,7 @@ MDX is a monorepo that uses [lerna][].
In order to release a new version you can follow these steps:

- Draft a release for the next version (vX.X.X)
- Release a prerelease
- `yarn lerna publish`
- Select prepatch/preminor/premajor
- Sanity check in a project or two with the prerelease
- `yarn lerna publish`
- `yarn && yarn test && yarn run publish`
- Publish release on GitHub

## Troubleshooting
Expand All @@ -155,5 +150,5 @@ If you’re having issues installing locally you might need to run
[unit-test]: https://twitter.com/sindresorhus/status/579306280495357953
[collective]: https://opencollective.com/unified
[micromark]: https://github.com/micromark/micromark
[lerna]: https://lernajs.io
[lerna]: https://lerna.js.org
[lerna-install]: https://github.com/lerna/lerna/issues/1457
4 changes: 2 additions & 2 deletions docs/editors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ The community has begun adding MDX syntax highlighting support for some editors!
- [vscode-mdx-preview][]: MDX Preview for VS Code
- [vim][]: Vim
- [sublime][]: Sublime
- [JetBrains IntelliJ/WebStorm][jetbrains]

### Editors needing support

- Atom
- Emacs
- [JetBrains IntelliJ/WebStorm][jetbrains]

---

Expand All @@ -21,4 +21,4 @@ Original GitHub issue: [#119](https://github.com/mdx-js/mdx/issues/119)
[vscode-mdx-preview]: https://github.com/xyc/vscode-mdx-preview
[vim]: https://github.com/jxnblk/vim-mdx-js
[sublime]: https://github.com/jonsuh/mdx-sublime
[jetbrains]: https://youtrack.jetbrains.com/issue/WEB-32599
[jetbrains]: https://plugins.jetbrains.com/plugin/14944-mdx
27 changes: 27 additions & 0 deletions docs/getting-started/-table-of-components.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
| Tag | Name | Syntax |
| ------------ | -------------------------------------------------------------------- | --------------------------------------------------- |
| `p` | [Paragraph](https://github.com/syntax-tree/mdast#paragraph) | |
| `h1` | [Heading 1](https://github.com/syntax-tree/mdast#heading) | `#` |
| `h2` | [Heading 2](https://github.com/syntax-tree/mdast#heading) | `##` |
| `h3` | [Heading 3](https://github.com/syntax-tree/mdast#heading) | `###` |
| `h4` | [Heading 4](https://github.com/syntax-tree/mdast#heading) | `####` |
| `h5` | [Heading 5](https://github.com/syntax-tree/mdast#heading) | `#####` |
| `h6` | [Heading 6](https://github.com/syntax-tree/mdast#heading) | `######` |
| `blockquote` | [Blockquote](https://github.com/syntax-tree/mdast#blockquote) | `>` |
| `ul` | [List](https://github.com/syntax-tree/mdast#list) | `-` |
| `ol` | [Ordered list](https://github.com/syntax-tree/mdast#list) | `1.` |
| `li` | [List item](https://github.com/syntax-tree/mdast#listitem) | |
| `table` | [Table](https://github.com/syntax-tree/mdast#table) | |
| `thead` | [Table head](https://github.com/syntax-tree/mdast#table) | |
| `tbody` | [Table body](https://github.com/syntax-tree/mdast#table) | |
| `tr` | [Table row](https://github.com/syntax-tree/mdast#tablerow) | |
| `td`/`th` | [Table cell](https://github.com/syntax-tree/mdast#tablecell) | |
| `code` | [Code](https://github.com/syntax-tree/mdast#code) | ` ```code``` ` |
| `inlineCode` | [InlineCode](https://github.com/syntax-tree/mdast#inlinecode) | `` `inlineCode` `` |
| `pre` | [Code](https://github.com/syntax-tree/mdast#code) | ` ```code``` ` |
| `em` | [Emphasis](https://github.com/syntax-tree/mdast#emphasis) | `_emphasis_` |
| `strong` | [Strong](https://github.com/syntax-tree/mdast#strong) | `**strong**` |
| `del` | [Delete](https://github.com/syntax-tree/mdast#delete) | `~~strikethrough~~` |
| `hr` | [Thematic break](https://github.com/syntax-tree/mdast#thematicbreak) | `---` or `***` |
| `a` | [Link](https://github.com/syntax-tree/mdast#link) | `<https://mdxjs.com>` or `[MDX](https://mdxjs.com)` |
| `img` | [Image](https://github.com/syntax-tree/mdast#image) | `![alt](https://mdx-logo.now.sh)` |
28 changes: 0 additions & 28 deletions docs/getting-started/_table-of-components.mdx

This file was deleted.

6 changes: 3 additions & 3 deletions docs/getting-started/gatsby.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ some awesome content
For more documentation on programmatically creating pages with Gatsby, see
the [Gatsby MDX docs][gatsby-mdx-docs].

[gatsby]: https://gatsbyjs.org
[gatsby-mdx-docs]: https://gatsbyjs.org/docs/mdx/
[gatsby-plugin-mdx]: https://gatsbyjs.org/packages/gatsby-plugin-mdx/
[gatsby]: https://gatsbyjs.com
[gatsby-mdx-docs]: https://gatsbyjs.com/docs/mdx/
[gatsby-plugin-mdx]: https://gatsbyjs.com/packages/gatsby-plugin-mdx/
4 changes: 2 additions & 2 deletions docs/getting-started/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Box} from '@rebass/emotion'

import TableOfComponents from './_table-of-components.mdx'
import TableOfComponents from './-table-of-components.mdx'

# Getting Started

Expand Down Expand Up @@ -109,7 +109,7 @@ things like the following markup:
JSX is good for **components**.
It makes repeating things more clear and allows for separation of concerns.
MDX fully supports [JSX syntax][jsx].
Any line that start with the `<` characters starts a JSX block.
Any line that start with the `<` character starts a JSX block.

### MDX

Expand Down
42 changes: 41 additions & 1 deletion docs/getting-started/next.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ const withMDX = require('@next/mdx')()
module.exports = withMDX()
```

### Treat `.mdx` files as pages

To have Next.js treat `.mdx` files in the pages directory as pages use the `pageExtensions` property:

```js
// next.config.js
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/
})
module.exports = withMDX({
pageExtensions: ['js', 'jsx', 'mdx']
})
```

### Use MDX for `.md` files

The Next.js MDX plugin allows for you to also use MDX parsing for `.md` files:
Expand All @@ -29,4 +43,30 @@ module.exports = withMDX({
})
```

[next-plugin]: https://github.com/zeit/next.js/tree/master/packages/next-mdx
### Providing MDX Plugins

In `next.config.js` you can also provide MDX plugins from remark and rehype

```js
const withMDX = require('@next/mdx')({
options: {
remarkPlugins: [],
rehypePlugins: []
}
})
module.exports = withMDX()
```

### Typescript support

```js
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/
})

module.exports = withMDX({
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx']
})
```

[next-plugin]: https://github.com/vercel/next.js/tree/canary/packages/next-mdx
3 changes: 2 additions & 1 deletion docs/guides/live-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ be automatically passed as props to your code block.

````md
```js live=true

```
````

Expand Down Expand Up @@ -70,7 +71,7 @@ MDXProvider in the components object so that it is rendered.
```js
// src/App.js
import React from 'react'
import {MDXProvider} from '@mdx-js/tag'
import {MDXProvider} from '@mdx-js/react'

import CodeBlock from './components/CodeBlock'

Expand Down
39 changes: 36 additions & 3 deletions docs/guides/math-blocks.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Math blocks

You can render math blocks via [remark-math](https://github.com/remarkjs/remark-math/blob/master/packages/remark-math) and [rehype-katex](https://github.com/remarkjs/remark-math/blob/master/packages/rehype-katex). remark-math parses math blocks and rehype-katex transforms the blocks into html elements with classes for styling.Also, you need to apply css style of KaTeX by yourself to render them properly.
You can render math blocks via [remark-math](https://github.com/remarkjs/remark-math/tree/main/packages/remark-math) and [rehype-katex](https://github.com/remarkjs/remark-math/tree/main/packages/rehype-katex). remark-math parses math blocks and rehype-katex transforms the blocks into html elements with classes for styling. Also, you need to apply css style of [KaTeX](https://katex.org/) by yourself to render them properly.

First, link a stylesheet and use the `$` syntax:

Expand Down Expand Up @@ -42,8 +42,22 @@ module.exports = {
{
resolve: '@mdx-js/loader',
options: {
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex]
remarkPlugins: [
[
remarkMath,
{
/* options */
}
]
],
rehypePlugins: [
[
rehypeKatex,
{
/* options */
}
]
]
}
}
]
Expand Down Expand Up @@ -72,3 +86,22 @@ module.exports = withMDX({
pageExtensions: ['js', 'jsx', 'md', 'mdx']
})
```

If you’re using MDX with Gatsby.js, you can use `gatsby-plugin-mdx` with the following configuration:

```js
// gatsby-config.js
const plugins = [
{
resolve: 'gatsby-plugin-mdx',
options: {
gatsbyRemarkPlugins: [
{
resolve: 'gatsby-remark-katex'
}
],
extensions: ['.mdx', '.md']
}
}
]
```
2 changes: 1 addition & 1 deletion docs/guides/terminal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ render(

<Tweet tweetId="1141781114786160641" />

[See the full example](https://github.com/mdx-js/mdx/tree/master/examples/cli)
[See the full example](https://github.com/mdx-js/mdx/tree/master/examples/terminal)

[ink]: https://github.com/vadimdemedes/ink
[runtime]: https://mdxjs.com/advanced/runtime
4 changes: 2 additions & 2 deletions docs/guides/vue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ yarn add @mdx-js/vue-loader

## Configuring webpack

In a [Vue CLI](https://cli.vuejs.org/) you need to add a `webpack.config.js` that
In a [Vue CLI](https://cli.vuejs.org/) you need to add a `vue.config.js` that
uses the MDX loader for vue:

```js
Expand All @@ -27,7 +27,7 @@ module.exports = {
module: {
rules: [
{
test: /.mdx?$/,
test: /\.mdx$/,
use: ['babel-loader', '@mdx-js/vue-loader']
}
]
Expand Down
Loading