Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/franciscop/markdown-it-github-video
- Owner: franciscop
- License: mit
- Created: 2021-08-29T17:18:14.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-30T10:39:02.000Z (about 3 years ago)
- Last Synced: 2024-10-06T10:18:20.681Z (about 1 month ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
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
//
```