Skip to content

Commit e587c8c

Browse files
committed
Update remark-preset-wooorm
1 parent aeed291 commit e587c8c

39 files changed

+865
-608
lines changed

docs/.remarkrc.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* @import {CheckFlag} from 'remark-lint-fenced-code-flag'
3+
* @import {Preset} from 'unified'
4+
*/
5+
6+
import remarkPresetWooorm from 'remark-preset-wooorm'
7+
import remarkLintFencedCodeFlag, {
8+
checkGithubLinguistFlag
9+
} from 'remark-lint-fenced-code-flag'
10+
import remarkLintNoHtml from 'remark-lint-no-html'
11+
import remarkValidateLinks from 'remark-validate-links'
12+
13+
/** @type {Preset} */
14+
const remarkPresetMdx = {
15+
plugins: [
16+
remarkPresetWooorm,
17+
[remarkLintFencedCodeFlag, check],
18+
[remarkLintNoHtml, false],
19+
[remarkValidateLinks, false]
20+
]
21+
}
22+
23+
export default remarkPresetMdx
24+
25+
/**
26+
* Check according to GitHub Linguist.
27+
*
28+
* @param {string} value
29+
* Language flag to check.
30+
* @returns {string | undefined}
31+
* Whether the flag is valid (`undefined`),
32+
* or a message to warn about (`string`).
33+
* @satisfies {CheckFlag}
34+
*/
35+
function check(value) {
36+
// To do: investigate if we can change ` ```jsx ` -> ` ```js `?
37+
if (value === 'jsx' || value === 'mdx-invalid') return undefined
38+
return checkGithubLinguistFlag(value)
39+
}

docs/.remarkrc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/blog/conf.mdx

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const info = {
44
author: [
55
{github: 'johno', name: 'John Otander', twitter: '4lpine'}
66
],
7-
modified: new Date('2021-11-01'),
7+
modified: new Date('2025-01-27'),
88
published: new Date('2020-07-31')
99
}
1010

@@ -42,51 +42,51 @@ content authoring, and even peek behind the curtains to see how MDX works.
4242

4343
## Speakers
4444

45-
### [Chris Biscardi](https://twitter.com/chrisbiscardi)
45+
### [Chris Biscardi][chrisbiscardi]
4646

47-
[![](https://github.com/ChristopherBiscardi.png?size=200)](https://twitter.com/chrisbiscardi)
47+
[![](https://github.com/ChristopherBiscardi.png?size=200)][chrisbiscardi]
4848

4949
Keynote: The past, present, and future of MDX
5050

51-
### [Monica Powell](https://twitter.com/waterproofheart)
51+
### [Monica Powell][waterproofheart]
5252

53-
[![](https://github.com/M0nica.png?size=200)](https://twitter.com/waterproofheart)
53+
[![](https://github.com/M0nica.png?size=200)][waterproofheart]
5454

5555
Migrating to MDX
5656

57-
### [Laurie Barth](https://twitter.com/laurieontech)
57+
### [Laurie Barth][laurieontech]
5858

59-
[![](https://github.com/laurieontech.png?size=200)](https://twitter.com/laurieontech)
59+
[![](https://github.com/laurieontech.png?size=200)][laurieontech]
6060

6161
MDX v2 syntax
6262

63-
### [Cole Bemis](https://twitter.com/colebemis)
63+
### [Cole Bemis][colebemis]
6464

65-
[![](https://github.com/colebemis.png?size=200)](https://twitter.com/colebemis)
65+
[![](https://github.com/colebemis.png?size=200)][colebemis]
6666

6767
Demystifying MDX
6868

69-
### [Prince Wilson](https://twitter.com/maxcell)
69+
### [Prince Wilson][maxcell]
7070

71-
[![](https://github.com/maxcell.png?size=200)](https://twitter.com/maxcell)
71+
[![](https://github.com/maxcell.png?size=200)][maxcell]
7272

7373
Personal site playgrounds
7474

75-
### [Kathleen McMahon](https://twitter.com/resource11)
75+
### [Kathleen McMahon][resource11]
7676

77-
[![](https://github.com/resource11.png?size=200)](https://twitter.com/resource11)
77+
[![](https://github.com/resource11.png?size=200)][resource11]
7878

7979
Digital gardening with MDX magic
8080

81-
### [Rodrigo Pombo](https://twitter.com/pomber)
81+
### [Rodrigo Pombo][pomber]
8282

83-
[![](https://github.com/pomber.png?size=200)](https://twitter.com/pomber)
83+
[![](https://github.com/pomber.png?size=200)][pomber]
8484

8585
The X in MDX
8686

87-
### [Jonathan Bakebwa](https://twitter.com/codebender828)
87+
### [Jonathan Bakebwa][codebender828]
8888

89-
[![](https://github.com/codebender828.png?size=200)](https://twitter.com/codebender828)
89+
[![](https://github.com/codebender828.png?size=200)][codebender828]
9090

9191
MDX and Vue/Nuxt
9292

@@ -120,8 +120,24 @@ We will have moderators to ensure that the code of conduct is followed.
120120

121121
Reach out to us on [Twitter][].
122122

123+
[chrisbiscardi]: https://twitter.com/chrisbiscardi
124+
125+
[coc]: https://github.com/partycorgi/partycorgi/blob/corgi/CODE_OF_CONDUCT.md
126+
127+
[codebender828]: https://twitter.com/codebender828
128+
129+
[colebemis]: https://twitter.com/colebemis
130+
123131
[first commit]: https://github.com/mdx-js/mdx/commit/dee47dc20b08d534132e3b966cdccf3b88c7bca5
124132

133+
[laurieontech]: https://twitter.com/laurieontech
134+
135+
[maxcell]: https://twitter.com/maxcell
136+
137+
[pomber]: https://twitter.com/pomber
138+
139+
[resource11]: https://twitter.com/resource11
140+
125141
[twitter]: https://twitter.com/mdx_js
126142

127-
[coc]: https://github.com/partycorgi/partycorgi/blob/corgi/CODE_OF_CONDUCT.md
143+
[waterproofheart]: https://twitter.com/waterproofheart

docs/blog/v1.mdx

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const info = {
44
author: [
55
{github: 'johno', name: 'John Otander', twitter: '4lpine'}
66
],
7-
modified: new Date('2021-11-01'),
7+
modified: new Date('2025-01-27'),
88
published: new Date('2019-04-11')
99
}
1010

@@ -67,7 +67,7 @@ lighterweight, and more customizable.
6767
**This means MDX can be used with any React, Vue, Preact, or any other library
6868
with JSX support**.
6969

70-
Special thanks to [@christopherbiscardi](https://github.com/christopherbiscardi)
70+
Special thanks to [@christopherbiscardi][christopherbiscardi]
7171
for implementing this feature.
7272

7373
[Read the blog post](/blog/custom-pragma/)
@@ -79,13 +79,13 @@ improving the overall documentation website experience.
7979

8080
* [Search (thanks Algolia)](https://mobile.twitter.com/4lpine/status/1114270174096412672)
8181
* [Guides](/guides/)
82-
* [Automatic deployment via ZEIT](https://zeit.co)
83-
* [Custom Gatsby theme](https://gatsbyjs.org)
82+
* [Automatic deployment via ZEIT][zeit]
83+
* [Custom Gatsby theme][gatsbyjs]
8484
* Reorganization of docs for intuitiveness
8585
* Full page rewrites to improve clarity
8686

8787
Special thanks to [@jxnblk](https://github.com/jxnblks) and
88-
[@wooorm](https://github.com/wooorm) for their help improving the docs and
88+
[@wooorm][wooorm] for their help improving the docs and
8989
updating the build tooling.
9090

9191
## Breaking changes
@@ -142,7 +142,7 @@ against an ever growing team of contributors.
142142
* [Docz](https://docz.site)
143143
* [MDX Deck](https://github.com/jxnblk/mdx-deck)
144144
* [Next.js](https://nextjs.org)
145-
* [Gatsby](https://gatsbyjs.org)
145+
* [Gatsby][gatsbyjs]
146146
* [AST Explorer](https://astexplorer.net)
147147
* [Vue support (alpha)](/docs/getting-started/#vue)
148148
* [Demoboard](https://frontarm.com/demoboard/)
@@ -158,7 +158,7 @@ might encounter.
158158
* Interleaving: [#195](https://github.com/mdx-js/mdx/issues/195)
159159
* Global shortcodes: [#508](https://github.com/mdx-js/mdx/pull/508)
160160
* Stable Vue support: [#238](https://github.com/mdx-js/mdx/issues/238)
161-
* Blocks: MDX WYSIWYG: [blocks/blocks](https://github.com/blocks/blocks)
161+
* Blocks: MDX WYSIWYG: [blocks/blocks][blocks]
162162
* MDX playground inspired by AST Explorer: [#220](https://github.com/mdx-js/mdx/issues/220)
163163
* New splash page: [#444](https://github.com/mdx-js/mdx/issues/444)
164164
* Showcase page: [#414](https://github.com/mdx-js/mdx/issues/414)
@@ -187,7 +187,7 @@ accessible as it can be from the beginning.
187187
When we have a beta ready we will be open sourcing it and announcing, so stay
188188
tuned.
189189

190-
[Check out the Blocks project](https://github.com/blocks/blocks)
190+
[Check out the Blocks project][blocks]
191191

192192
## unified collective
193193

@@ -196,8 +196,8 @@ dealing with many sources of content.
196196
unified projects are used all over the web, and it would never be possible
197197
without financial support from our fine sponsors.
198198

199-
* [ZEIT](https://zeit.co) 🥇
200-
* [Gatsby](https://gatsbyjs.org) 🥇
199+
* [ZEIT][] 🥇
200+
* [Gatsby][gatsbyjs] 🥇
201201
* [Holloway](https://www.holloway.com) 🥉
202202
* [Backers](https://opencollective.com/unified#budget) 🏆
203203
* [You?](https://opencollective.com/unified)👤
@@ -206,10 +206,10 @@ without financial support from our fine sponsors.
206206

207207
We’d like to say thanks to all our contributors and our happy users.
208208
Special thanks to
209-
[@wooorm](https://github.com/wooorm),
209+
[@wooorm][wooorm],
210210
[@silvenon](https://github.com/silvenon),
211211
[@timneutkens](https://github.com/timneutkens),
212-
[@ChristopherBiscardi](https://github.com/christopherbiscardi),
212+
[@ChristopherBiscardi][christopherbiscardi],
213213
[@jxnblk](https://github.com/jxnblk),
214214
[@alexandernanberg](https://github.com/alexandernanberg),
215215
[@jescalan](https://github.com/jescalan),
@@ -239,3 +239,13 @@ Special thanks to
239239
[@johnsherrard](https://github.com/johnsherrard),
240240
[@sw-yx](https://github.com/sw-yx),
241241
and anyone we may have forgotten.
242+
243+
[blocks]: https://github.com/blocks/blocks
244+
245+
[christopherbiscardi]: https://github.com/christopherbiscardi
246+
247+
[gatsbyjs]: https://gatsbyjs.org
248+
249+
[wooorm]: https://github.com/wooorm
250+
251+
[zeit]: https://zeit.co

docs/blog/v2.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const info = {
33
author: [
44
{github: 'wooorm', name: 'Titus Wormer', twitter: 'wooorm'}
55
],
6-
modified: new Date('2023-10-24'),
6+
modified: new Date('2025-01-27'),
77
published: new Date('2022-02-01')
88
}
99

@@ -321,30 +321,30 @@ Emmie Päivärinta ([**@emmiep**](https://github.com/emmiep)),
321321
Eugene Ghanizadeh ([**@loreanvictor**](https://github.com/loreanvictor)),
322322
and anyone we may have forgotten.
323323

324-
[what]: /docs/what-is-mdx/
324+
[architecture]: /packages/mdx/#architecture
325325

326-
[getting-started]: /docs/getting-started/
326+
[contribute]: /community/contribute/
327327

328328
[extending]: /docs/extending-mdx/
329329

330-
[architecture]: /packages/mdx/#architecture
330+
[getting-started]: /docs/getting-started/
331331

332332
[jsx-runtime]: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html
333333

334334
[micromark]: https://github.com/micromark/micromark
335335

336-
[typescript]: https://www.typescriptlang.org
337-
338-
[ts]: /docs/getting-started/#types
339-
340336
[migrating]: /migrating/v2/
341337

342-
[unified]: https://unifiedjs.com
338+
[packages]: /packages/
343339

344340
[rsc]: https://reactjs.org/blog/2020/12/21/data-fetching-with-react-server-components.html
345341

346-
[packages]: /packages/
342+
[ts]: /docs/getting-started/#types
347343

348344
[types-mdx]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mdx
349345

350-
[contribute]: /community/contribute/
346+
[typescript]: https://www.typescriptlang.org
347+
348+
[unified]: https://unifiedjs.com
349+
350+
[what]: /docs/what-is-mdx/

docs/blog/v3.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const info = {
33
author: [
44
{github: 'wooorm', name: 'Titus Wormer', twitter: 'wooorm'}
55
],
6-
modified: new Date('2023-10-24'),
6+
modified: new Date('2025-01-27'),
77
published: new Date('2023-10-24')
88
}
99

@@ -123,12 +123,12 @@ Víctor Fernández ([**@victor23k**](https://github.com/victor23k)),
123123
Titus Wormer ([**@wooorm**](https://github.com/wooorm)),
124124
and anyone we may have forgotten.
125125

126-
[migrating]: /migrating/v3/
127-
128-
[playground]: /playground/
129-
130126
[injecting-components]: /guides/injecting-components/
131127

132128
[markdown-tm-language]: https://github.com/wooorm/markdown-tm-language
133129

130+
[migrating]: /migrating/v3/
131+
132+
[playground]: /playground/
133+
134134
[starry-night]: https://github.com/wooorm/starry-night

0 commit comments

Comments
 (0)