Skip to content

saranmahadev/docsify-embed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docsify Embed

Plugin for Docsify to embed different types of content.

Usage

Include the script by CDN - https://cdn.jsdelivr.net/gh/saranmahadev/docsify-embed@1.0.0/dist/docsify-embed.min.js

<script src="https://cdn.jsdelivr.net/gh/saranmahadev/docsify-embed@1.0.0/dist/docsify-embed.min.js">

[or]

Download from the releases - https://github.com/saranmahadev/docsify-embed/releases/tag/v1.0.0 and include the file locally.

Features

YouTube

%//[youtube](video-id)

Get the ID of the video from the URL.

Example:

For the URL - https://www.youtube.com/watch?v=Zz0lHE-KKlA, the ID is Zz0lHE-KKlA.

%//[youtube](Zz0lHE-KKlA)

Demo: %youtube


Codepen

%//[codepen](username-penid-themeno)

  • Username - Username of the user on Codepen.
  • PenID - PenID of the pen.
  • ThemeNo - Theme number of the pen.

There are three themes available for the embed

  • 0 - Default theme
  • 1 - Dark theme
  • 2 - Yellow theme

Example

For the Codepen: https://codepen.io/saranmahadev/pen/xxPzjWB, the username is saranmahadev, PenID is xxPzjWB and theme is your choice (I prefer 1).

%//[codepen](saranmahadev-xxPzjWB-1)

Demo: %codepen


Twitter

%//[twitter](tweet-url)

Example: Get the Link

example

The tweet-url is https://twitter.com/SaranMahadev5/status/1494993462344642562.

Demo %twitter


GitHub

%//[github](username/repository)

  • username - Username of the user on GitHub.
  • repository - Repository name [Public Repository].

Example:

For the repository, https://github.com/saranmahadev/devops-digest, the username is saranmahadev and repository is devops-digest.

%//[github](saranmahadev/devops-digest)

Demo:

%github


Instagram

%//[instagram](url)

Grab the link of the post.

example

The post link is https://www.instagram.com/p/CSdT72dsAcy/.

%//[instagram](https://www.instagram.com/p/CSdT72dsAcy/)

Demo:

%instagram


Spotify

%//[spotify](songid-theme)

songid - Song ID of the song. theme - Theme of the song.

spotify

The copied link is https://open.spotify.com/track/4d1yaOX7QjaXNxa3uNmXv9 and the song ID is 4d1yaOX7QjaXNxa3uNmXv9 and the theme is 0 or 1.

%//[spotify](4d1yaOX7QjaXNxa3uNmXv9-1)

Demo:

%spotify


About

Plugin for Docsify to Embed Content

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors