Skip to content

A embedder from any markdown external into your own site.

License

Notifications You must be signed in to change notification settings

nakorndev/markdown-embedder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

markdown-embedder

Anyway, sorry for my English. Pull request for me if you insist on improvement this document :)

This package is for getting a context from external link that should contain a raw markdown only, then we will convert into HTML element and render to .g-embed class.

Usage

Import a script markdown-embbeder.js from dist folder into bottom of your page.

Note: this script not work inside <head> tag and only working after all page rendered. that meaning you should add this script into bottom of you site before your </body> close tag

<script src="/path/to/markdown-embedder.js"></script>

Then add any HTML element that contain a class="g-embed" attribute with your external link of raw markdown in data-url="http://example.com/markdown.md"

<div class="g-embed" data-url="http://example.com/markdown.md"></div>

That's all. :)