Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/franciscop/markdown-it-github-video

Markdown It plugin for adding Github Videos
https://github.com/franciscop/markdown-it-github-video

Last synced: 14 days ago
JSON representation

Markdown It plugin for adding Github Videos

Awesome Lists containing this project

README

        

# Markdown It Github Video Plugin

A plugin for rendering Github Videos also in plain Markdown. Videos embedded in Github look like this:

https://user-images.githubusercontent.com/2801252/131259499-54a3188d-46c3-4015-98e3-2477684351b6.mp4

> Note: the above link works on Github, but not on npm website as of now

There was no solution to parse the same github links into a `` for your own website. Now there is with `markdown-it-github-video`!

To upload a video to Github Readme, just drop it while editing the readme.md, see the instructions by the CEO of Github:

https://twitter.com/natfriedman/status/1383169112948449286

## Getting started

Install the plugin:

```bash
npm i markdown-it-github-video
```

```js
import mdit from "markdown-it";
import github_video from "./index.js";

const md = mdit().use(github_video);

const out = md.render(`# Hello

https://user-images.githubusercontent.com/2801252/131257834-bfd9b6c6-f22e-46f2-9d06-8c14ac7f2708.mp4`);
console.log(out);
//

Hello


//


```