mirror of
https://github.com/mdx-js/mdx.git
synced 2024-09-11 15:05:32 +03:00
Miscellaneous small improvements (#1748)
This commit is contained in:
parent
d24f5efb89
commit
62661563fe
@ -87,7 +87,6 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dd,
|
dd,
|
||||||
.note,
|
|
||||||
.content {
|
.content {
|
||||||
padding-inline: calc(1em + 1ex);
|
padding-inline: calc(1em + 1ex);
|
||||||
}
|
}
|
||||||
@ -111,7 +110,6 @@ hr,
|
|||||||
table,
|
table,
|
||||||
blockquote,
|
blockquote,
|
||||||
.block,
|
.block,
|
||||||
.note,
|
|
||||||
.frame {
|
.frame {
|
||||||
margin-block: calc(1em + 1ex);
|
margin-block: calc(1em + 1ex);
|
||||||
}
|
}
|
||||||
@ -658,6 +656,10 @@ button.success {
|
|||||||
background-color: rgba(130 80 223 / 0.15);
|
background-color: rgba(130 80 223 / 0.15);
|
||||||
border: 1px solid var(--purple-5);
|
border: 1px solid var(--purple-5);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
font-size: smaller;
|
||||||
|
line-height: calc(1em + (1 / 0.8 * 1ex));
|
||||||
|
padding-inline: calc(1 / 0.8 * (1em + 1ex));
|
||||||
|
margin-block: calc(1 / 0.8 * (1em + 1ex));
|
||||||
}
|
}
|
||||||
|
|
||||||
.legacy {
|
.legacy {
|
||||||
@ -670,11 +672,6 @@ button.success {
|
|||||||
border-color: var(--coral-5);
|
border-color: var(--coral-5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-inside {
|
|
||||||
font-size: smaller;
|
|
||||||
line-height: calc(1em + (1 / 0.8 * 1ex));
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
display: block;
|
display: block;
|
||||||
padding: calc(1 * (1em + 1ex));
|
padding: calc(1 * (1em + 1ex));
|
||||||
|
@ -116,7 +116,7 @@ export const Editor = ({children}) => {
|
|||||||
</pre>
|
</pre>
|
||||||
</noscript>
|
</noscript>
|
||||||
<CodeMirror
|
<CodeMirror
|
||||||
value={defaultValue}
|
value={state.value}
|
||||||
extensions={extensions}
|
extensions={extensions}
|
||||||
onUpdate={(v) => {
|
onUpdate={(v) => {
|
||||||
if (v.docChanged) {
|
if (v.docChanged) {
|
||||||
@ -208,7 +208,7 @@ export const Editor = ({children}) => {
|
|||||||
<div className="frame-body frame-body-box-fixed-height frame-body-box">
|
<div className="frame-body frame-body-box-fixed-height frame-body-box">
|
||||||
{state.file && state.file.result ? (
|
{state.file && state.file.result ? (
|
||||||
<ErrorBoundary FallbackComponent={FallbackComponent}>
|
<ErrorBoundary FallbackComponent={FallbackComponent}>
|
||||||
<state.file.result />
|
{state.file.result()}
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,24 +6,31 @@ import {sortItems} from './sort.js'
|
|||||||
const dateTimeFormat = new Intl.DateTimeFormat('en', {dateStyle: 'long'})
|
const dateTimeFormat = new Intl.DateTimeFormat('en', {dateStyle: 'long'})
|
||||||
|
|
||||||
export const Layout = (props) => {
|
export const Layout = (props) => {
|
||||||
const {name, navTree, ghUrl, meta = {}} = props
|
const {name, navTree, ghUrl} = props
|
||||||
const [self, parent] = findSelfAndParent(navTree) || []
|
const [self, parent] = findSelfAndParent(navTree) || []
|
||||||
const siblings = parent
|
const siblings = parent
|
||||||
? sortItems(parent.children, parent.data.navSortItems)
|
? sortItems(parent.children, parent.data.navSortItems)
|
||||||
: []
|
: []
|
||||||
|
const meta = (self ? self.data.meta : props.meta) || {}
|
||||||
const index = siblings.indexOf(self)
|
const index = siblings.indexOf(self)
|
||||||
const previous = index === -1 ? undefined : siblings[index - 1]
|
const previous = index === -1 ? undefined : siblings[index - 1]
|
||||||
const next = index === -1 ? undefined : siblings[index + 1]
|
const next = index === -1 ? undefined : siblings[index + 1]
|
||||||
const authors = meta.authors || []
|
const metaAuthors = meta.authors || []
|
||||||
const time = (self ? accumulateReadingTime(self) : []).map((d) =>
|
const metaTime = (
|
||||||
Math.ceil(d)
|
self
|
||||||
)
|
? accumulateReadingTime(self)
|
||||||
|
: meta.readingTime
|
||||||
|
? Array.isArray(meta.readingTime)
|
||||||
|
? meta.readingTime
|
||||||
|
: [meta.readingTime, meta.readingTime]
|
||||||
|
: []
|
||||||
|
).map((d) => Math.ceil(d))
|
||||||
let timeLabel
|
let timeLabel
|
||||||
|
|
||||||
if (time.length > 1 && time[0] !== time[1]) {
|
if (metaTime.length > 1 && metaTime[0] !== metaTime[1]) {
|
||||||
timeLabel = time[0] + '-' + time[1] + ' minutes'
|
timeLabel = metaTime[0] + '-' + metaTime[1] + ' minutes'
|
||||||
} else if (time[0]) {
|
} else if (metaTime[0]) {
|
||||||
timeLabel = time[0] + ' minute' + (time[0] > 1 ? 's' : '')
|
timeLabel = metaTime[0] + ' minute' + (metaTime[0] > 1 ? 's' : '')
|
||||||
}
|
}
|
||||||
|
|
||||||
function accumulateReadingTime(d) {
|
function accumulateReadingTime(d) {
|
||||||
@ -102,7 +109,7 @@ export const Layout = (props) => {
|
|||||||
|
|
||||||
const readingTime = timeLabel ? <>{timeLabel} read</> : undefined
|
const readingTime = timeLabel ? <>{timeLabel} read</> : undefined
|
||||||
|
|
||||||
const creditsList = authors.map((d, i) => {
|
const creditsList = metaAuthors.map((d, i) => {
|
||||||
const href = d.github
|
const href = d.github
|
||||||
? 'https://github.com/' + d.github
|
? 'https://github.com/' + d.github
|
||||||
: d.twitter
|
: d.twitter
|
||||||
|
@ -11,9 +11,5 @@ export const Note = (props) => {
|
|||||||
throw new Error('Unknown note type `' + type + '`')
|
throw new Error('Unknown note type `' + type + '`')
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return <div className={className.join(' ')}>{children}</div>
|
||||||
<div className={className.join(' ')}>
|
|
||||||
<div className="note-inside">{children}</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
@ -18,49 +18,52 @@ export const config = {
|
|||||||
author: 'MDX contributors'
|
author: 'MDX contributors'
|
||||||
}
|
}
|
||||||
|
|
||||||
// To do: check if all the hashes still work.
|
|
||||||
export const redirect = {
|
export const redirect = {
|
||||||
'/about/index.html': '/community/about/',
|
'/about/index.html': '/community/about/',
|
||||||
'/advanced/index.html': '/guides/',
|
'/advanced/index.html': '/guides/',
|
||||||
'/advanced/api/index.html': '/packages/mdx/#api',
|
'/advanced/api/index.html': '/packages/mdx/#api',
|
||||||
'/advanced/ast/index.html': '/packages/remark-mdx/#syntax-tree',
|
'/advanced/ast/index.html': '/packages/remark-mdx/#syntax-tree',
|
||||||
'/advanced/components/index.html': '/using-mdx/',
|
'/advanced/components/index.html': '/docs/using-mdx/',
|
||||||
'/advanced/contributing/index.html': '/community/contribute/',
|
'/advanced/contributing/index.html': '/community/contribute/',
|
||||||
'/advanced/custom-loader/index.html': '/guides/frontmatter/',
|
'/advanced/custom-loader/index.html': '/guides/frontmatter/',
|
||||||
'/advanced/retext-plugins/index.html': '/extending-mdx/#using-plugins',
|
'/advanced/retext-plugins/index.html': '/docs/extending-mdx/#using-plugins',
|
||||||
'/advanced/plugins/index.html': '/extending-mdx/',
|
'/advanced/plugins/index.html': '/docs/extending-mdx/',
|
||||||
'/advanced/runtime/index.html': '/packages/mdx/#evaluatefile-options',
|
'/advanced/runtime/index.html': '/packages/mdx/#evaluatefile-options',
|
||||||
'/advanced/specification/index.html': '/packages/remark-mdx/#syntax-tree',
|
'/advanced/specification/index.html': '/packages/remark-mdx/#syntax-tree',
|
||||||
'/advanced/sync-api/index.html': '/packages/mdx/#api',
|
'/advanced/sync-api/index.html': '/packages/mdx/#api',
|
||||||
'/advanced/transform-content/index.html': '/packages/remark-mdx/',
|
'/advanced/transform-content/index.html': '/packages/remark-mdx/',
|
||||||
'/advanced/typescript/index.html': '/getting-started/#types',
|
'/advanced/typescript/index.html': '/docs/getting-started/#types',
|
||||||
'/advanced/writing-a-plugin/index.html': '/guides/frontmatter/',
|
'/advanced/writing-a-plugin/index.html': '/guides/frontmatter/',
|
||||||
'/contributing/index.html': '/community/contribute/',
|
'/contributing/index.html': '/community/contribute/',
|
||||||
'/editor-plugins/index.html': '/getting-started/#editor',
|
'/editor-plugins/index.html': '/docs/getting-started/#editor',
|
||||||
'/editors/index.html': '/getting-started/#editor',
|
'/editors/index.html': '/docs/getting-started/#editor',
|
||||||
'/getting-started/create-react-app/index.html':
|
'/getting-started/create-react-app/index.html':
|
||||||
'/getting-started/#create-react-app-cra',
|
'/docs/getting-started/#create-react-app-cra',
|
||||||
'/getting-started/gatsby/index.html': '/getting-started/#gatsby',
|
'/getting-started/gatsby/index.html': '/docs/getting-started/#gatsby',
|
||||||
'/getting-started/next/index.html': '/getting-started/#nextjs',
|
'/getting-started/next/index.html': '/docs/getting-started/#nextjs',
|
||||||
'/getting-started/parcel/index.html': '/getting-started/#parcel',
|
'/getting-started/parcel/index.html': '/docs/getting-started/#parcel',
|
||||||
'/getting-started/react-static/index.html': '/getting-started/#react-static',
|
'/getting-started/react-static/index.html':
|
||||||
|
'/docs/getting-started/#react-static',
|
||||||
'/getting-started/table-of-components/index.html': '/table-of-components/',
|
'/getting-started/table-of-components/index.html': '/table-of-components/',
|
||||||
'/getting-started/typescript/index.html': '/getting-started/#types',
|
'/getting-started/typescript/index.html': '/docs/getting-started/#types',
|
||||||
'/getting-started/webpack/index.html': '/getting-started/#webpack',
|
'/getting-started/webpack/index.html': '/docs/getting-started/#webpack',
|
||||||
|
'/getting-started/index.html': '/docs/getting-started/',
|
||||||
'/guides/custom-loader/index.html': '/guides/frontmatter/',
|
'/guides/custom-loader/index.html': '/guides/frontmatter/',
|
||||||
'/guides/live-code/index.html':
|
'/guides/live-code/index.html':
|
||||||
'/guides/syntax-highlighting/#syntax-highlighting-with-the-meta-field',
|
'/guides/syntax-highlighting/#syntax-highlighting-with-the-meta-field',
|
||||||
'/guides/markdown-in-components/index.html': '/mdx/',
|
'/guides/markdown-in-components/index.html': '/docs/what-is-mdx/',
|
||||||
'/guides/math-blocks/index.html': '/guides/math/',
|
'/guides/math-blocks/index.html': '/guides/math/',
|
||||||
'/guides/mdx-embed/index.html': '/guides/embed/#embeds-at-run-time',
|
'/guides/mdx-embed/index.html': '/guides/embed/#embeds-at-run-time',
|
||||||
'/guides/table-of-contents/index.html': '/extending-mdx/',
|
'/guides/table-of-contents/index.html': '/docs/extending-mdx/',
|
||||||
'/guides/terminal/index.html': '/getting-started/#ink',
|
'/guides/terminal/index.html': '/docs/getting-started/#ink',
|
||||||
'/guides/vue/index.html': '/getting-started/#vue',
|
'/guides/vue/index.html': '/docs/getting-started/#vue',
|
||||||
'/guides/wrapper-customization/index.html': '/using-mdx/#layout',
|
'/guides/wrapper-customization/index.html': '/docs/using-mdx/#layout',
|
||||||
'/guides/writing-a-plugin/index.html': '/extending-mdx/#creating-plugins',
|
'/guides/writing-a-plugin/index.html':
|
||||||
'/plugins/index.html': '/extending-mdx/#using-plugins',
|
'/docs/extending-mdx/#creating-plugins',
|
||||||
|
'/mdx/index.html': '/docs/what-is-mdx/',
|
||||||
|
'/plugins/index.html': '/docs/extending-mdx/#using-plugins',
|
||||||
'/projects/index.html': '/community/projects/',
|
'/projects/index.html': '/community/projects/',
|
||||||
'/support/index.html': '/community/support/',
|
'/support/index.html': '/community/support/',
|
||||||
'/syntax/index.html': '/getting-started/#syntax',
|
'/syntax/index.html': '/docs/getting-started/#syntax',
|
||||||
'/vue/index.html': '/getting-started/#vue'
|
'/vue/index.html': '/docs/getting-started/#vue'
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ export const info = {
|
|||||||
|
|
||||||
# Blog
|
# Blog
|
||||||
|
|
||||||
The latest news about MDX
|
The latest news about MDX.
|
||||||
|
|
||||||
{
|
{
|
||||||
(() => {
|
(() => {
|
||||||
|
@ -22,7 +22,7 @@ export const info = {
|
|||||||
# Playground
|
# Playground
|
||||||
|
|
||||||
Here you can play with the MDX format.
|
Here you can play with the MDX format.
|
||||||
Write some MDX to find out what it turns into.
|
Write some MDX to find out what it turns into. {/* more */}
|
||||||
You can see the rendered result, the generated code, and the intermediary
|
You can see the rendered result, the generated code, and the intermediary
|
||||||
ASTs.
|
ASTs.
|
||||||
This can be helpful for debugging or exploring.
|
This can be helpful for debugging or exploring.
|
||||||
|
@ -21,7 +21,7 @@ export const info = {
|
|||||||
# Components
|
# Components
|
||||||
|
|
||||||
A great thing about MDX is that you can write markdown and specify a component
|
A great thing about MDX is that you can write markdown and specify a component
|
||||||
to be used instead of an HTML element.
|
to be used instead of an HTML element. {/* more */}
|
||||||
The following table lists those HTML elements that can be overwritten,
|
The following table lists those HTML elements that can be overwritten,
|
||||||
the needed markdown,
|
the needed markdown,
|
||||||
and what the normal JSX equivalent would be.
|
and what the normal JSX equivalent would be.
|
||||||
|
93
package-lock.json
generated
93
package-lock.json
generated
@ -3911,9 +3911,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/capture-website": {
|
"node_modules/capture-website": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/capture-website/-/capture-website-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/capture-website/-/capture-website-2.1.1.tgz",
|
||||||
"integrity": "sha512-17fp4LkNKtvZLK6E5Jbpf4lquEYKUG3Qj/xGbciSE4A34lhWOWhYg8pOMi/eO/KMrLfmB+vXNV15kyoqIrDVmw==",
|
"integrity": "sha512-f0cUD4Oks/hZg4ImEdR7HMSVkGz7GIG1dN8Ww0uquNJcNfkdUuWMO7vsHKkTEK2ArBZoBJb+b89GTU7AbuzrQA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"file-url": "^4.0.0",
|
"file-url": "^4.0.0",
|
||||||
@ -8335,9 +8335,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/highlight.js": {
|
"node_modules/highlight.js": {
|
||||||
"version": "11.3.0",
|
"version": "11.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.3.1.tgz",
|
||||||
"integrity": "sha512-4NRoSbc7W4m7bZWsiE7JMBkGSKj/b1UI/acG2EigsQ3KHXyYfWPjdTUefNJuqbAtS13/r+pAWmXWHaGJVuWn2A==",
|
"integrity": "sha512-PUhCRnPjLtiLHZAQ5A/Dt5F8cWZeMyj9KRsACsWT+OD6OP0x6dp5OmT5jdx0JgEyPxPZZIPQpRN2TciUT7occw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.0.0"
|
"node": ">=12.0.0"
|
||||||
@ -9333,9 +9333,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/istanbul-lib-coverage": {
|
"node_modules/istanbul-lib-coverage": {
|
||||||
"version": "3.1.0",
|
"version": "3.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz",
|
||||||
"integrity": "sha512-OFSPP1Csv3GxruycNA1iRJPnc5pon+N4Q89EUz8KYOFbdsqCoHRh0J8jwRdna5thveVcMTdgY27kUl/lZuAWdw==",
|
"integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
@ -10347,29 +10347,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/lowlight": {
|
"node_modules/lowlight": {
|
||||||
"version": "2.3.0",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/lowlight/-/lowlight-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/lowlight/-/lowlight-2.4.0.tgz",
|
||||||
"integrity": "sha512-jt5hnNR6l1dITmu905cYTrM7YywF38Ae+CoGCHegLPmPL+5mmiwlH6Na3aSTW5Ge11z4M06Pn2aOz2pdG3RFSA==",
|
"integrity": "sha512-LeZ+k0MzE1Phw94fa/HMlCO1G0rJzThVdrEWOpNKaw9r6zfv7SORt6qPaXfYFpBlT9XhVdR9Dg8w9uPlmUMMJg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/hast": "^2.0.0",
|
"@types/hast": "^2.0.0",
|
||||||
"fault": "^2.0.0",
|
"fault": "^2.0.0",
|
||||||
"highlight.js": "~11.2.0"
|
"highlight.js": "~11.3.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "github",
|
"type": "github",
|
||||||
"url": "https://github.com/sponsors/wooorm"
|
"url": "https://github.com/sponsors/wooorm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/lowlight/node_modules/highlight.js": {
|
|
||||||
"version": "11.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.2.0.tgz",
|
|
||||||
"integrity": "sha512-JOySjtOEcyG8s4MLR2MNbLUyaXqUunmSnL2kdV/KuGJOmHZuAR5xC54Ko7goAXBWNhf09Vy3B+U7vR62UZ/0iw==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/lru-cache": {
|
"node_modules/lru-cache": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||||
@ -11050,9 +11041,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/micromark-core-commonmark": {
|
"node_modules/micromark-core-commonmark": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.4.tgz",
|
||||||
"integrity": "sha512-0E8aE27v0DYHPk40IxzhCdXnZWQuvZ6rbflrx1u8ZZAUJEB48o0fgLXA5+yMab28yXT+mi1Q4LXdsI4oGS6Vng==",
|
"integrity": "sha512-HAtoZisp1M/sQFuw2zoUKGo1pMKod7GSvdM6B2oBU0U2CEN5/C6Tmydmi1rmvEieEhGQsjMyiiSoYgxISNxGFA==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "GitHub Sponsors",
|
"type": "GitHub Sponsors",
|
||||||
@ -15016,9 +15007,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rehype-meta": {
|
"node_modules/rehype-meta": {
|
||||||
"version": "3.1.0",
|
"version": "3.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/rehype-meta/-/rehype-meta-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/rehype-meta/-/rehype-meta-3.2.0.tgz",
|
||||||
"integrity": "sha512-YHs/Q9pos7Cw7uNsDRZHbfXOXvK/wJwa4M0x4Vfaf6yOBotilJHkgoKTIf6iJVlDkQ0kzl23ew/ZwQpfdBAQwQ==",
|
"integrity": "sha512-TCnjilLMe1CkeJOCww5MEUJFczxrRWkXF+P4hXIKpOOY3Di5B7Wv7BHKRN7GQQePL/71Xh9Wtc1y60fkiIXuqA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/hast": "^2.0.0",
|
"@types/hast": "^2.0.0",
|
||||||
@ -26123,9 +26114,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"capture-website": {
|
"capture-website": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/capture-website/-/capture-website-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/capture-website/-/capture-website-2.1.1.tgz",
|
||||||
"integrity": "sha512-17fp4LkNKtvZLK6E5Jbpf4lquEYKUG3Qj/xGbciSE4A34lhWOWhYg8pOMi/eO/KMrLfmB+vXNV15kyoqIrDVmw==",
|
"integrity": "sha512-f0cUD4Oks/hZg4ImEdR7HMSVkGz7GIG1dN8Ww0uquNJcNfkdUuWMO7vsHKkTEK2ArBZoBJb+b89GTU7AbuzrQA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"file-url": "^4.0.0",
|
"file-url": "^4.0.0",
|
||||||
@ -29453,9 +29444,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"highlight.js": {
|
"highlight.js": {
|
||||||
"version": "11.3.0",
|
"version": "11.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.3.1.tgz",
|
||||||
"integrity": "sha512-4NRoSbc7W4m7bZWsiE7JMBkGSKj/b1UI/acG2EigsQ3KHXyYfWPjdTUefNJuqbAtS13/r+pAWmXWHaGJVuWn2A==",
|
"integrity": "sha512-PUhCRnPjLtiLHZAQ5A/Dt5F8cWZeMyj9KRsACsWT+OD6OP0x6dp5OmT5jdx0JgEyPxPZZIPQpRN2TciUT7occw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"hmac-drbg": {
|
"hmac-drbg": {
|
||||||
@ -30165,9 +30156,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"istanbul-lib-coverage": {
|
"istanbul-lib-coverage": {
|
||||||
"version": "3.1.0",
|
"version": "3.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz",
|
||||||
"integrity": "sha512-OFSPP1Csv3GxruycNA1iRJPnc5pon+N4Q89EUz8KYOFbdsqCoHRh0J8jwRdna5thveVcMTdgY27kUl/lZuAWdw==",
|
"integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"istanbul-lib-report": {
|
"istanbul-lib-report": {
|
||||||
@ -30930,22 +30921,14 @@
|
|||||||
"integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA=="
|
"integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA=="
|
||||||
},
|
},
|
||||||
"lowlight": {
|
"lowlight": {
|
||||||
"version": "2.3.0",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/lowlight/-/lowlight-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/lowlight/-/lowlight-2.4.0.tgz",
|
||||||
"integrity": "sha512-jt5hnNR6l1dITmu905cYTrM7YywF38Ae+CoGCHegLPmPL+5mmiwlH6Na3aSTW5Ge11z4M06Pn2aOz2pdG3RFSA==",
|
"integrity": "sha512-LeZ+k0MzE1Phw94fa/HMlCO1G0rJzThVdrEWOpNKaw9r6zfv7SORt6qPaXfYFpBlT9XhVdR9Dg8w9uPlmUMMJg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/hast": "^2.0.0",
|
"@types/hast": "^2.0.0",
|
||||||
"fault": "^2.0.0",
|
"fault": "^2.0.0",
|
||||||
"highlight.js": "~11.2.0"
|
"highlight.js": "~11.3.0"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"highlight.js": {
|
|
||||||
"version": "11.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.2.0.tgz",
|
|
||||||
"integrity": "sha512-JOySjtOEcyG8s4MLR2MNbLUyaXqUunmSnL2kdV/KuGJOmHZuAR5xC54Ko7goAXBWNhf09Vy3B+U7vR62UZ/0iw==",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lru-cache": {
|
"lru-cache": {
|
||||||
@ -31465,9 +31448,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"micromark-core-commonmark": {
|
"micromark-core-commonmark": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.4.tgz",
|
||||||
"integrity": "sha512-0E8aE27v0DYHPk40IxzhCdXnZWQuvZ6rbflrx1u8ZZAUJEB48o0fgLXA5+yMab28yXT+mi1Q4LXdsI4oGS6Vng==",
|
"integrity": "sha512-HAtoZisp1M/sQFuw2zoUKGo1pMKod7GSvdM6B2oBU0U2CEN5/C6Tmydmi1rmvEieEhGQsjMyiiSoYgxISNxGFA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"micromark-factory-destination": "^1.0.0",
|
"micromark-factory-destination": "^1.0.0",
|
||||||
"micromark-factory-label": "^1.0.0",
|
"micromark-factory-label": "^1.0.0",
|
||||||
@ -34323,9 +34306,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rehype-meta": {
|
"rehype-meta": {
|
||||||
"version": "3.1.0",
|
"version": "3.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/rehype-meta/-/rehype-meta-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/rehype-meta/-/rehype-meta-3.2.0.tgz",
|
||||||
"integrity": "sha512-YHs/Q9pos7Cw7uNsDRZHbfXOXvK/wJwa4M0x4Vfaf6yOBotilJHkgoKTIf6iJVlDkQ0kzl23ew/ZwQpfdBAQwQ==",
|
"integrity": "sha512-TCnjilLMe1CkeJOCww5MEUJFczxrRWkXF+P4hXIKpOOY3Di5B7Wv7BHKRN7GQQePL/71Xh9Wtc1y60fkiIXuqA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/hast": "^2.0.0",
|
"@types/hast": "^2.0.0",
|
||||||
|
52
vercel.json
52
vercel.json
@ -20,7 +20,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/advanced/components/",
|
"source": "/advanced/components/",
|
||||||
"destination": "/using-mdx/"
|
"destination": "/docs/using-mdx/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/advanced/contributing/",
|
"source": "/advanced/contributing/",
|
||||||
@ -32,11 +32,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/advanced/retext-plugins/",
|
"source": "/advanced/retext-plugins/",
|
||||||
"destination": "/extending-mdx/#using-plugins"
|
"destination": "/docs/extending-mdx/#using-plugins"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/advanced/plugins/",
|
"source": "/advanced/plugins/",
|
||||||
"destination": "/extending-mdx/"
|
"destination": "/docs/extending-mdx/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/advanced/runtime/",
|
"source": "/advanced/runtime/",
|
||||||
@ -56,7 +56,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/advanced/typescript/",
|
"source": "/advanced/typescript/",
|
||||||
"destination": "/getting-started/#types"
|
"destination": "/docs/getting-started/#types"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/advanced/writing-a-plugin/",
|
"source": "/advanced/writing-a-plugin/",
|
||||||
@ -68,31 +68,31 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/editor-plugins/",
|
"source": "/editor-plugins/",
|
||||||
"destination": "/getting-started/#editor"
|
"destination": "/docs/getting-started/#editor"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/editors/",
|
"source": "/editors/",
|
||||||
"destination": "/getting-started/#editor"
|
"destination": "/docs/getting-started/#editor"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/getting-started/create-react-app/",
|
"source": "/getting-started/create-react-app/",
|
||||||
"destination": "/getting-started/#create-react-app-cra"
|
"destination": "/docs/getting-started/#create-react-app-cra"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/getting-started/gatsby/",
|
"source": "/getting-started/gatsby/",
|
||||||
"destination": "/getting-started/#gatsby"
|
"destination": "/docs/getting-started/#gatsby"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/getting-started/next/",
|
"source": "/getting-started/next/",
|
||||||
"destination": "/getting-started/#nextjs"
|
"destination": "/docs/getting-started/#nextjs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/getting-started/parcel/",
|
"source": "/getting-started/parcel/",
|
||||||
"destination": "/getting-started/#parcel"
|
"destination": "/docs/getting-started/#parcel"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/getting-started/react-static/",
|
"source": "/getting-started/react-static/",
|
||||||
"destination": "/getting-started/#react-static"
|
"destination": "/docs/getting-started/#react-static"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/getting-started/table-of-components/",
|
"source": "/getting-started/table-of-components/",
|
||||||
@ -100,11 +100,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/getting-started/typescript/",
|
"source": "/getting-started/typescript/",
|
||||||
"destination": "/getting-started/#types"
|
"destination": "/docs/getting-started/#types"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/getting-started/webpack/",
|
"source": "/getting-started/webpack/",
|
||||||
"destination": "/getting-started/#webpack"
|
"destination": "/docs/getting-started/#webpack"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "/getting-started/",
|
||||||
|
"destination": "/docs/getting-started/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/guides/custom-loader/",
|
"source": "/guides/custom-loader/",
|
||||||
@ -116,7 +120,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/guides/markdown-in-components/",
|
"source": "/guides/markdown-in-components/",
|
||||||
"destination": "/mdx/"
|
"destination": "/docs/what-is-mdx/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/guides/math-blocks/",
|
"source": "/guides/math-blocks/",
|
||||||
@ -128,27 +132,31 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/guides/table-of-contents/",
|
"source": "/guides/table-of-contents/",
|
||||||
"destination": "/extending-mdx/"
|
"destination": "/docs/extending-mdx/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/guides/terminal/",
|
"source": "/guides/terminal/",
|
||||||
"destination": "/getting-started/#ink"
|
"destination": "/docs/getting-started/#ink"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/guides/vue/",
|
"source": "/guides/vue/",
|
||||||
"destination": "/getting-started/#vue"
|
"destination": "/docs/getting-started/#vue"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/guides/wrapper-customization/",
|
"source": "/guides/wrapper-customization/",
|
||||||
"destination": "/using-mdx/#layout"
|
"destination": "/docs/using-mdx/#layout"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/guides/writing-a-plugin/",
|
"source": "/guides/writing-a-plugin/",
|
||||||
"destination": "/extending-mdx/#creating-plugins"
|
"destination": "/docs/extending-mdx/#creating-plugins"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "/mdx/",
|
||||||
|
"destination": "/docs/what-is-mdx/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/plugins/",
|
"source": "/plugins/",
|
||||||
"destination": "/extending-mdx/#using-plugins"
|
"destination": "/docs/extending-mdx/#using-plugins"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/projects/",
|
"source": "/projects/",
|
||||||
@ -160,11 +168,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/syntax/",
|
"source": "/syntax/",
|
||||||
"destination": "/getting-started/#syntax"
|
"destination": "/docs/getting-started/#syntax"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/vue/",
|
"source": "/vue/",
|
||||||
"destination": "/getting-started/#vue"
|
"destination": "/docs/getting-started/#vue"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,7 @@ async function main() {
|
|||||||
.use(rehypeMeta, {
|
.use(rehypeMeta, {
|
||||||
twitter: true,
|
twitter: true,
|
||||||
og: true,
|
og: true,
|
||||||
|
ogNameInTitle: true,
|
||||||
copyright: true,
|
copyright: true,
|
||||||
type: 'article',
|
type: 'article',
|
||||||
name: config.title,
|
name: config.title,
|
||||||
|
Loading…
Reference in New Issue
Block a user