Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mdx-js/mdx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.16.8
Choose a base ref
...
head repository: mdx-js/mdx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.17.0
Choose a head ref
  • 10 commits
  • 22 files changed
  • 3 contributors

Commits on Jan 25, 2019

  1. Add missing gatsby example (#384)

    johno authored and timneutkens committed Jan 25, 2019
    1
    Copy the full SHA
    b673132 View commit details
  2. 1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a573b34 View commit details

Commits on Jan 28, 2019

  1. Add my blog to docs (#388)

    mxstbr authored and johno committed Jan 28, 2019
    1
    Copy the full SHA
    fdf9201 View commit details
  2. Fix apostrophe

    johno committed Jan 28, 2019
    1
    Copy the full SHA
    61f78ea View commit details

Commits on Feb 5, 2019

  1. Fix runtime build script (#394)

    Looks like in 0.16.1 the prepare script was dropped,
    most likely inadvertently. This adds it back (as a
    more proper prepublish script as well).
    
    Related #386
    johno authored Feb 5, 2019
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bd36c9f View commit details
  2. Issue 344: automate canary releases (#393)

    * Add publish script and configuration for ci
    
    * Add travis config to skip cleanup
    
    * Add .npmrc file for publishing through travis
    leimonio authored and johno committed Feb 5, 2019
    1
    Copy the full SHA
    a14cce5 View commit details

Commits on Feb 11, 2019

  1. Don't mark remark-mdx as private (#395)

    * Don't mark remark-mdx as private
    
    * Use full install command
    johno authored Feb 11, 2019
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4b214fc View commit details
  2. v0.16.9

    johno committed Feb 11, 2019
    1
    Copy the full SHA
    e7870f9 View commit details
  3. Rename remark-mdx

    johno committed Feb 11, 2019
    Copy the full SHA
    f054bf2 View commit details
  4. v0.17.0

    johno committed Feb 11, 2019
    1
    Copy the full SHA
    74d9d3e View commit details
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@ cache:
yarn: true
directories:
- node_modules
before_deploy:
- echo "//registry.npmjs.org/:_authToken=\${NPM_AUTH_TOKEN}" >> $HOME/.npmrc 2> /dev/null
deploy:
provider: script
script: yarn publish-ci
32 changes: 32 additions & 0 deletions docs/getting-started/index.md
Original file line number Diff line number Diff line change
@@ -107,6 +107,38 @@ browser navigation.
Avoid this by following the pattern shown above and declare your mapping as a
constant.

### Table of components

The following components are rendered from Markdown, so these can be keys
in the component object you pass to MDXProvider.

| 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) | `######` |
| `thematicBreak` | [Thematic break](https://github.com/syntax-tree/mdast#thematicbreak) | `***` |
| `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) | `--- | --- | ---` |
| `tr` | [Table row](https://github.com/syntax-tree/mdast#tablerow) | `This | is | a | table row` |
| `td`/`th` | [Table cell](https://github.com/syntax-tree/mdast#tablecell) | |
| `pre` | [Pre](https://github.com/syntax-tree/mdast#code) | |
| `code` | [Code](https://github.com/syntax-tree/mdast#code) | |
| `em` | [Emphasis](https://github.com/syntax-tree/mdast#emphasis) | `_emphasis_` |
| `strong` | [Strong](https://github.com/syntax-tree/mdast#strong) | `**strong**` |
| `delete` | [Delete](https://github.com/syntax-tree/mdast#delete) | `~~strikethrough~~` |
| `code` | [InlineCode](https://github.com/syntax-tree/mdast#inlinecode) | |
| `hr` | [Break](https://github.com/syntax-tree/mdast#break) | `---` |
| `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)` |

### Updating the mapping object during application runtime

If you need to change the mapping during runtime, declare it on the componentʼs
3 changes: 3 additions & 0 deletions docs/projects.md
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
* [ZEIT Docs][zeit-docs]
* [Compositor][compositor]
* [Prisma][prisma]
* [Max Stoiber’s Blog][mxstbr]

## Other related links

@@ -39,6 +40,8 @@

[prisma]: https://www.prisma.io/docs

[mxstbr]: https://mxstbr.com/blog

[awesome-mdx]: https://github.com/transitive-bullshit/awesome-mdx

[spectacle-boilerplate-mdx]: https://github.com/FormidableLabs/spectacle-boilerplate-mdx
3 changes: 3 additions & 0 deletions examples/gatsby/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.cache
public
12 changes: 12 additions & 0 deletions examples/gatsby/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
plugins: [
{
resolve: 'gatsby-mdx',
options: {
defaultLayouts: {
default: require.resolve('./src/components/Layout')
}
}
}
]
}
15 changes: 15 additions & 0 deletions examples/gatsby/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"private": true,
"name": "gatsby",
"scripts": {
"start": "gatsby develop",
"build": "gatsby build"
},
"dependencies": {
"@mdx-js/mdx": "^0.16.8",
"@mdx-js/tag": "^0.16.8",
"gatsby": "^2.0.98",
"gatsby-mdx": "^0.3.5",
"unified-ui": "^0.0.3"
}
}
5 changes: 5 additions & 0 deletions examples/gatsby/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Gatsby + MDX

```sh
yarn && yarn start
```
17 changes: 17 additions & 0 deletions examples/gatsby/src/components/Layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react'
import {Container, baseStyles} from 'unified-ui'

const Style = ({children}) => (
<style
dangerouslySetInnerHTML={{
__html: children
}}
/>
)

export default props => (
<>
<Style>{baseStyles}</Style>
<Container {...props} />
</>
)
1 change: 1 addition & 0 deletions examples/gatsby/src/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Hello, world!
Loading