• Stars
    star
    203
  • Rank 188,752 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 6 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

How to embed a video in markdown? Here the answer. Add videos to your markdown files easier.

Video to Markdown

Test Cloudinary PayPal.me Sponsor

Netlify Status

Add videos to your markdown files easier starting from here!

Why?

How often did you find yourself googling ¨How to embed a video in markdown?¨

While its not possible to embed a video in markdown, the best and easiest way is to extract a frame from the video, add a layer with a play icon and link the video url on the image.

Speaking HTMLese, this is what you would do:

<a href="{video-url}" title="Link Title"><img src="{image-url}" alt="Alternate Text" /></a>

that translates into markdown as:

[![Alternate Text]({image-url})]({video-url} "Link Title")

To speed up the process I developped this tool that will do it for you.

You just need to paste the video url in the field above and you will get the markdown you need.

Features

List of supported video providers:

  • Asciinema
  • CleanShot Cloud
  • Dailymotion
  • Facebook (low-quality)
  • Google Drive
  • Imgur
  • Loom
  • OneDrive
  • PeerTube
  • Streamable
  • TikTok
  • Vimeo
  • Wistia
  • Youtube

Hosting

First of all you need to create a Cloudinary account (I'm using this service to generate and host images) so that you can copy your personal CLOUDINARY_URL from your dashboard. The url is something similar to cloudinary://my_key:my_secret@my_cloud_name.

Now you can easily deploy your own copy on Netlify.

Deploy to Netlify

Development stuff

To run the project locally, here’s what you’ll need:

Requirements

Setup

cd into your local copy of the repository and run pnpm install

cd video-to-markdown
pnpm install
cp .env.sample .env
# update the .env with proper values
  • CLOUDINARY_URL ( required ) - this is the API Environment variable that you can get from your Cloudinary dashboard inside the Account Details section.
  • GA_TRACKING_ID ( optional ) - this is a Google Analytics Tracking ID. Can be used if you need to track page views and events.
  • NETLIFY_ACCESS_TOKEN ( optional ) - this a Netlify Access Token. In combination with the SITE_ID can be used to display the API Usage in the website.
  • SITE_ID ( optional ) - this the Netlify Site ID. In combination with the NETLIFY_ACCESS_TOKEN can be used to display the API Usage in the website.
  • USE_HIGH_QUALITY ( optional ) - this is a boolean flag. If true, the generated images will be stored in Contenful with hi-res quality (default to false)
pnpm dev

# http://localhost:8888

Privacy

Google Analytics is used to record the following:

All images are generated via Cloudinary and stored in it. In this way the generated images are cached so we can avoid to call Netlify functions again thus reducing the quota consumption.

By clicking on convert to markdown or consuming api you accept this terms & condition; no additional data is sent to the server.

More Repositories

1

figma-export

Export tool for Figma. You can easily and automatically export your Figma components and use them directly into your website.
TypeScript
245
star
2

speedtest-for-digitalocean

Run speed tests for all DigitalOcean datacenters faster than ever.
JavaScript
41
star
3

bash_profile

A collection of bash utilities. Set and unset proxy. Completions for git, svn and ssh. PS1 customization.
Shell
18
star
4

wasm-vs-js-benchmark

A comparison between WebAssembly and Javascript.
JavaScript
13
star
5

jquery-jcreate

jCreate is a new special event for jQuery. Just use .on('create', ..); the callback will be triggered when elements are created on the page.
JavaScript
12
star
6

figma-plugin-run-github-actions-workflows

Run GitHub Actions workflows directly within Figma, using the selected page and nodes as inputs.
TypeScript
6
star
7

html-miner

A powerful miner that will scrape html pages for you. ` HTML Scraper ´
JavaScript
4
star
8

figma-export-pdfs-action

A GitHub Action that exports content from a Figma file as a PDF document.
TypeScript
4
star
9

contentful-migration-tool

Run Contentful migrations more easily with just one command. It makes migration processes a breeze.
TypeScript
3
star
10

hb-ejs

A Harp Boilerplate.
JavaScript
3
star
11

cv

This is my curriculum. It's just a PDF but with some cool behind the scenes.
TypeScript
2
star
12

marcomontalbano.github.io

My personal website.
Astro
2
star
13

an-introduction-to-frontend

A course I developed in 2017 to introduce backend developers and interns at Sopra Steria to the fundamentals of frontend development.
HTML
1
star
14

kata.js

A collection of katas with JavaScript.
TypeScript
1
star
15

numberun

NumbeRun is a puzzle game I developed in 2007 for my school-leaving examination. The game was developed in Microsoft Visual C# 2005 using the Microsoft XNA library.
Pascal
1
star