Skip to content

Instantly share code, notes, and snippets.

@daKmoR
Created April 13, 2020 21:22
Show Gist options
  • Save daKmoR/4c078f83878c7b66bcce46ec2d394932 to your computer and use it in GitHub Desktop.
Save daKmoR/4c078f83878c7b66bcce46ec2d394932 to your computer and use it in GitHub Desktop.
Markdium-Introducing mdjs - interactive demos everywhere
const stories = [{ key: 'demo', story: demo, code: demo }];
for (const story of stories) {
const storyEl = rootNode.querySelector(`[mdjs-story-name="${story.key}"]`);
storyEl.story = story.story;
storyEl.code = story.code;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment