Skip to content
This repository was archived by the owner on Apr 5, 2020. It is now read-only.

ledyba/embed-markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmbedMarkdown

A very simple webapps to embed remote markdown files into your blogs/websites.

Example

It's used to embed novels hosted in github into our website.

Examples:

Frontend

How to use

Server

  • golang
$ go get -u "github.com/russross/blackfriday"
$ go get -u "github.com/microcosm-cc/bluemonday"
$ go build -o embed-markdown "github.com/ledyba/embed-markdown"
$ ./embed-markdown -port=8080

You can daemonize this process by systemd, upstart, supervisord, etc, etc...

Client

without async

<body>
...
Please enjoy the story:

<script src="https://<server-location>?<file-to-embed>"></script>

e.g.)
<script src="https://app.7io.org/EmbedMarkdown/?https://raw.githubusercontent.com/YorabaTaiju/WhiteFoxAndBlackCat/master/README.md"></script>
</boby>

async

<body>
...
Please enjoy the story:

<div id="<elem-id>"></div>
<script async src="https://<server-location>/async/<elem-id>?<file-to-embed>"></script>

e.g.)
<div id="Ewm1yvGPjp"></div>
<script src="https://app.7io.org/EmbedMarkdown/async/Ewm1yvGPjp?https://raw.githubusercontent.com/YorabaTaiju/WhiteFoxAndBlackCat/master/README.md"></script>
</boby>

About

A very simple webapp to embed remote markdown files into your blogs/websites.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors