Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(okidoc-site): render react components inside markdown #44

Merged
merged 3 commits into from
May 1, 2018

Conversation

bodia-uz
Copy link
Collaborator

@bodia-uz bodia-uz commented Apr 20, 2018

inspired by https://using-remark.gatsbyjs.org/custom-components/ so has same caveats

Example:

# site.yml
...
mdComponents:
  path: ./docs/playground-components.js
  # NOTE: `externalScripts` and `externalLinks` may affect your scripts and styles
  # externalStyles: []
  # externalScripts: []
...
// playground-components.js

import React from 'react';

export default {
  counter: () => <span>!COUNTER!</span>
};
<!-- index.md -->

# Counter

<counter></counter>

The additional example for playable:
https://github.com/wix/playable/compare/feature/okidoc-demo-components

@bodia-uz bodia-uz force-pushed the feature/react-inside-md branch 5 times, most recently from c4cc037 to e222a44 Compare April 24, 2018 14:20
@kupriyanenko
Copy link
Contributor

Please change externalLinks to externalStyles

@bodia-uz bodia-uz merged commit 819c521 into master May 1, 2018
@bodia-uz bodia-uz deleted the feature/react-inside-md branch May 1, 2018 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants