embed-markdown

command module
v0.0.0-...-df14c50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2018 License: AGPL-3.0 Imports: 11 Imported by: 0

README

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>

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL