<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yizack Rangel</title>
    <description>The latest articles on DEV Community by Yizack Rangel (@yizack).</description>
    <link>https://dev.to/yizack</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F877362%2Ff707e0dc-6567-4ee7-b27e-0c315118e4a1.jpg</url>
      <title>DEV Community: Yizack Rangel</title>
      <link>https://dev.to/yizack</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yizack"/>
    <language>en</language>
    <item>
      <title>nuxt-twemoji</title>
      <dc:creator>Yizack Rangel</dc:creator>
      <pubDate>Thu, 22 Jun 2023 00:42:17 +0000</pubDate>
      <link>https://dev.to/yizack/nuxt-twemoji-1mhc</link>
      <guid>https://dev.to/yizack/nuxt-twemoji-1mhc</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm1rinex8l6b30rqu1gwa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm1rinex8l6b30rqu1gwa.png" alt="nuxt-twemoji" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Twemoji module for Nuxt. Render emojis as SVG elements or PNG images&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/Yizack/nuxt-twemoji/blob/main/CHANGELOG.md" rel="noopener noreferrer"&gt;✨ Release Notes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackblitz.com/github/yizack/nuxt-twemoji?file=playground%2Fapp%2Fpages%2Findex.vue" rel="noopener noreferrer"&gt;🏀 Online playground&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Features&lt;/li&gt;
&lt;li&gt;Quick Setup&lt;/li&gt;
&lt;li&gt;Module configs&lt;/li&gt;
&lt;li&gt;Components&lt;/li&gt;
&lt;li&gt;
Usage (Twemoji)

&lt;ul&gt;
&lt;li&gt;Twemoji properties&lt;/li&gt;
&lt;li&gt;Rendering&lt;/li&gt;
&lt;li&gt;Definitions&lt;/li&gt;
&lt;li&gt;More examples&lt;/li&gt;
&lt;li&gt;Twemoji Default CSS&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Usage (Twemojify)

&lt;ul&gt;
&lt;li&gt;Twemojify properties&lt;/li&gt;
&lt;li&gt;Parser&lt;/li&gt;
&lt;li&gt;Twemojify Default CSS&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Usage (TwemojiParse)

&lt;ul&gt;
&lt;li&gt;TwemojiParse properties&lt;/li&gt;
&lt;li&gt;DOM parser&lt;/li&gt;
&lt;li&gt;TwemojiParse Default CSS&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Credits&lt;/li&gt;

&lt;li&gt;Development&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Nuxt 4 ready&lt;/li&gt;
&lt;li&gt;Emoji 17.0 support&lt;/li&gt;
&lt;li&gt;Render emoji by character&lt;/li&gt;
&lt;li&gt;Render emoji by codepoint&lt;/li&gt;
&lt;li&gt;Render emoji by definition object&lt;/li&gt;
&lt;li&gt;SVG rendering by default&lt;/li&gt;
&lt;li&gt;SVG caching with localStorage&lt;/li&gt;
&lt;li&gt;PNG image render option&lt;/li&gt;
&lt;li&gt;Twitter Emoji assets from ex-Twitter author (&lt;a href="https://github.com/jdecked/twemoji" rel="noopener noreferrer"&gt;jdecked/twemoji&lt;/a&gt;) fork repository&lt;/li&gt;
&lt;li&gt;Assets from the &lt;a href="https://www.jsdelivr.com/" rel="noopener noreferrer"&gt;jsDelivr&lt;/a&gt; CDN&lt;/li&gt;
&lt;li&gt;Multiples ways of use&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Setup
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add &lt;code&gt;nuxt-twemoji&lt;/code&gt; dependency to your project
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nuxi@latest module add twemoji
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Add &lt;code&gt;nuxt-twemoji&lt;/code&gt; to the &lt;code&gt;modules&lt;/code&gt; section of &lt;code&gt;nuxt.config.ts&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineNuxtConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;nuxt-twemoji&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it! You can now use &lt;code&gt;nuxt-twemoji&lt;/code&gt; in your Nuxt app ✨&lt;/p&gt;

&lt;h2&gt;
  
  
  Module configs
&lt;/h2&gt;

&lt;p&gt;You can configure the module by adding the &lt;code&gt;twemoji&lt;/code&gt; property to the &lt;code&gt;nuxt.config.ts&lt;/code&gt; file. The following are the default configurations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineNuxtConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;twemoji&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;maxAge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;3.154&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="c1"&gt;// SVG cache expiration time in seconds (1 year)&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;svg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="c1"&gt;// Default rendering mode. 'svg' or 'png'&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Components
&lt;/h2&gt;

&lt;p&gt;You can make use of any of these available components according to your Nuxt app needs.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;SSR&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Twemoji&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Renders Twemojis by emoji characters, codepoint or definition.&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Twemojify&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Parses a text and replaces all emoji characters with Twemoji svg elements or png images.&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;TwemojiParse&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Wrap elements with the component and it will parse all emoji characters found with Twemoji svg or png image elements.&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Usage (&lt;code&gt;Twemoji&lt;/code&gt;)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Find emojis from &lt;a href="https://emojipedia.org/" rel="noopener noreferrer"&gt;emojipedia&lt;/a&gt;, &lt;a href="https://getemoji.com/" rel="noopener noreferrer"&gt;getemoji&lt;/a&gt; or &lt;a href="https://unicode.org/emoji/charts-17.0/full-emoji-list.html" rel="noopener noreferrer"&gt;unicode emoji list&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;In your project, use the component &lt;code&gt;&amp;lt;Twemoji emoji="" /&amp;gt;&lt;/code&gt;, where &lt;code&gt;emoji&lt;/code&gt; is the emoji character or codepoint.&lt;/li&gt;
&lt;li&gt;If you employ SSR (Server Side Rendering) in your Nuxt application, this module will inject the emoji &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; element into the output code during your project's build/generate process. Alternatively, if SSR is not used, the emojis will dynamically render during client runtime.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;Twemoji&lt;/code&gt; properties
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Required&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;emoji&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;string&lt;/code&gt; or &lt;code&gt;EmojiDefinition&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1em&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mode&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;svg&lt;/code&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Rendering
&lt;/h3&gt;

&lt;p&gt;Use the emoji property to render an emoji by character.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Render SVG element --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;emoji=&lt;/span&gt;&lt;span class="s"&gt;"🚀"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Resize --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;emoji=&lt;/span&gt;&lt;span class="s"&gt;"🚀"&lt;/span&gt; &lt;span class="na"&gt;size=&lt;/span&gt;&lt;span class="s"&gt;"2em"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Render PNG &amp;lt;img&amp;gt; element --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;emoji=&lt;/span&gt;&lt;span class="s"&gt;"🚀"&lt;/span&gt; &lt;span class="na"&gt;mode=&lt;/span&gt;&lt;span class="s"&gt;"png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the emoji property to render an emoji by codepoint.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;emoji=&lt;/span&gt;&lt;span class="s"&gt;"1F60A"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;emoji=&lt;/span&gt;&lt;span class="s"&gt;"U+1F60A"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the emoji property to render an emoji by &lt;a href="https://github.com/Yizack/nuxt-twemoji/blob/main/src/runtime/assets/emojis.ts" rel="noopener noreferrer"&gt;definition&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;setup&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;twSmilingFaceWithSmilingEyes&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;nuxt-twemoji/emojis&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;:emoji=&lt;/span&gt;&lt;span class="s"&gt;"twSmilingFaceWithSmilingEyes"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The emojis file has been generated using the self made &lt;a href="https://github.com/Yizack/nuxt-twemoji/blob/main/scripts/generateEmojis.js" rel="noopener noreferrer"&gt;&lt;code&gt;generateEmojis.js&lt;/code&gt;&lt;/a&gt; script, which fetches emojis data from the &lt;a href="https://home.unicode.org/" rel="noopener noreferrer"&gt;Unicode&lt;/a&gt; public Emoji 17.0 file available at &lt;a href="https://unicode.org/Public/17.0.0/emoji/emoji-test.txt" rel="noopener noreferrer"&gt;https://unicode.org/Public/17.0.0/emoji/emoji-test.txt&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Definitions
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;EmojiDefinition&lt;/code&gt; type represents objects that have these specific three string properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;code&lt;/code&gt; represents the code associated with the emoji.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;emoji&lt;/code&gt; represents the actual emoji.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;name&lt;/code&gt; represents the name of the emoji.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;EmojiDefinition&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;emoji&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  More examples
&lt;/h3&gt;

&lt;p&gt;Check out the &lt;a href="https://stackblitz.com/github/yizack/nuxt-twemoji?file=playground%2Fapp%2Fpages%2Findex.vue" rel="noopener noreferrer"&gt;🏀 Online playground&lt;/a&gt; for more examples.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;Twemoji&lt;/code&gt; Default CSS
&lt;/h3&gt;

&lt;p&gt;Both the &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags will have the &lt;code&gt;.twemoji&lt;/code&gt; class assigned to them. These are the default styles, but you can add your own styles by using the class name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.twemoji&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;vertical-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;middle&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage (&lt;code&gt;Twemojify&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;This component parses a string text and replaces all emoji characters with Twemoji svg elements or png images.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the project, use the component &lt;code&gt;&amp;lt;Twemojify text="" /&amp;gt;&lt;/code&gt;, where &lt;code&gt;text&lt;/code&gt; is a string.&lt;/li&gt;
&lt;li&gt;If you employ SSR (Server Side Rendering) in your Nuxt application, this module will inject the emoji &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; element into the output code during your project's build/generate process. Alternatively, if SSR is not used, the emojis will dynamically render during client runtime.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;Twemojify&lt;/code&gt; properties
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Required&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;text&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mode&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;svg&lt;/code&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Parser
&lt;/h3&gt;

&lt;p&gt;This component uses the &lt;code&gt;@twemoji/parser&lt;/code&gt; package by &lt;a href="https://github.com/jdecked" rel="noopener noreferrer"&gt;jdecked&lt;/a&gt; for identifying emoji entities within a string.&lt;/p&gt;

&lt;p&gt;Use the text property to parse all the emoji characters inside a string&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Replaces ❤️ and 🚀 with SVG elements --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Twemojify&lt;/span&gt; &lt;span class="na"&gt;text=&lt;/span&gt;&lt;span class="s"&gt;"I ❤️ Nuxt 🚀"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Replaces ❤️ and 🚀 with PNG images --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Twemojify&lt;/span&gt; &lt;span class="na"&gt;text=&lt;/span&gt;&lt;span class="s"&gt;"I ❤️ Nuxt 🚀"&lt;/span&gt; &lt;span class="na"&gt;mode=&lt;/span&gt;&lt;span class="s"&gt;"png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;Twemojify&lt;/code&gt; Default CSS
&lt;/h3&gt;

&lt;p&gt;Both the &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags will have the &lt;code&gt;.twemojify&lt;/code&gt; class assigned to them. These are the default styles, but you can add your own styles by using the class name.&lt;/p&gt;

&lt;p&gt;These style rules make sure that parsed emojis will have the same size as the wrapper element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.twemojify&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;.05em&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;.1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;vertical-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-0.1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage (&lt;code&gt;TwemojiParse&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;This component will parse all emoji characters found.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Wrap elements inside the &lt;code&gt;&amp;lt;TwemojiParse&amp;gt; &amp;lt;/TwemojiParse&amp;gt;&lt;/code&gt; component&lt;/li&gt;
&lt;li&gt;If you want to parse emojis with png images, use the &lt;code&gt;mode&lt;/code&gt; configuration or property with the component, otherwise it will parse svg images by default.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note: This component has a drawback as it does not support SSR (Server-Side Rendering) because it is executed during the mounted Vue lifecycle, functioning solely on the client-side.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;TwemojiParse&lt;/code&gt; properties
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Required&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mode&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;svg&lt;/code&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  DOM parser
&lt;/h3&gt;

&lt;p&gt;This component uses the &lt;code&gt;@twemoji/api&lt;/code&gt; package by &lt;a href="https://github.com/jdecked" rel="noopener noreferrer"&gt;jdecked&lt;/a&gt; and its DOM parser api.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Replaces 🚀 with SVG image --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;TwemojiParse&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Nuxt Twemoji 🚀&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/TwemojiParse&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Replaces 🚀 with PNG image --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;TwemojiParse&lt;/span&gt; &lt;span class="na"&gt;mode=&lt;/span&gt;&lt;span class="s"&gt;"png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Nuxt Twemoji 🚀&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/TwemojiParse&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- You can wrap any amount of emojis inside the component --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;TwemojiParse&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Nuxt Twemoji 🚀&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;I ❤️ Nuxt 🚀&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/TwemojiParse&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;TwemojiParse&lt;/code&gt; Default CSS
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags will have the &lt;code&gt;.twemojiParse&lt;/code&gt; class assigned to them. These are the default styles, but you can add your own styles by using the class name.&lt;/p&gt;

&lt;p&gt;These style rules make sure that parsed emojis will have the same size as the wrapper element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;img&lt;/span&gt;&lt;span class="nc"&gt;.twemojiParse&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;.05em&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;.1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;vertical-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-0.1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Credits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Twitter Emoji assets from &lt;a href="https://github.com/jdecked/twemoji" rel="noopener noreferrer"&gt;jdecked/twemoji&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Default CDN &lt;a href="https://www.jsdelivr.com/" rel="noopener noreferrer"&gt;jsDelivr&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://home.unicode.org/" rel="noopener noreferrer"&gt;Unicode&lt;/a&gt; public &lt;a href="https://unicode.org/Public/17.0.0/emoji" rel="noopener noreferrer"&gt;Emoji 17.0&lt;/a&gt; files&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/nuxt/nuxt" rel="noopener noreferrer"&gt;Nuxt&lt;/a&gt;, the JavaScript framework for creating SSR Vue applications and its &lt;a href="https://nuxt.com/docs/guide/going-further/modules" rel="noopener noreferrer"&gt;Module Author Guide&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Development
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install dependencies&lt;/span&gt;
pnpm &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# Generate type stubs&lt;/span&gt;
pnpm dev:prepare

&lt;span class="c"&gt;# Develop with the playground&lt;/span&gt;
pnpm dev

&lt;span class="c"&gt;# Build the playground&lt;/span&gt;
pnpm dev:build

&lt;span class="c"&gt;# Run ESLint&lt;/span&gt;
pnpm lint

&lt;span class="c"&gt;# Run Vitest&lt;/span&gt;
pnpm &lt;span class="nb"&gt;test
&lt;/span&gt;pnpm &lt;span class="nb"&gt;test&lt;/span&gt;:watch

&lt;span class="c"&gt;# Run typecheck&lt;/span&gt;
pnpm &lt;span class="nb"&gt;test&lt;/span&gt;:types

&lt;span class="c"&gt;# Release new version&lt;/span&gt;
pnpm release
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>nuxt</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Display a card with your Gists on your GitHub README.md</title>
      <dc:creator>Yizack Rangel</dc:creator>
      <pubDate>Fri, 07 Oct 2022 23:56:00 +0000</pubDate>
      <link>https://dev.to/yizack/display-a-card-with-your-gists-on-your-github-readmemd-1kgn</link>
      <guid>https://dev.to/yizack/display-a-card-with-your-gists-on-your-github-readmemd-1kgn</guid>
      <description>&lt;h1&gt;
  
  
  GitHub Gists Readme (gists-readme)
&lt;/h1&gt;

&lt;p&gt;Display a card with your Gists on your GitHub README.md&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Gists List Card

&lt;ul&gt;
&lt;li&gt;Example 1&lt;/li&gt;
&lt;li&gt;Example 2&lt;/li&gt;
&lt;li&gt;Example 3&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Gist Pin

&lt;ul&gt;
&lt;li&gt;Example 1&lt;/li&gt;
&lt;li&gt;Example 2&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Generate your card here: &lt;a href="https://gists-readme.yizack.com" rel="noopener noreferrer"&gt;https://gists-readme.yizack.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Gists List Card
&lt;/h2&gt;

&lt;p&gt;Display a list of your gists&lt;/p&gt;

&lt;h3&gt;
  
  
  Parameters
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Optional&lt;/th&gt;
&lt;th&gt;Default value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;user&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your GitHub profile username.&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;theme&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Set the theme of the card.&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;default&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;n&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Number of Gists to display.&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;30&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;title&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Set the title of the card.&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;My Gists&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Card Example 1
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;user&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yizack&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;theme&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dark&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Result
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/Yizack" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgists-readme.yizack.com%2Fapi%3Fuser%3Dyizack%26theme%3Ddark" alt="gists-readme" width="445" height="150"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![gists-readme&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://gists-readme.yizack.com/api?user=yizack&amp;amp;theme=dark&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://gist.github.com/Yizack)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Card Example 2
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;user&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yizack&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;n&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Result
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/Yizack" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgists-readme.yizack.com%2Fapi%3Fuser%3Dyizack%26n%3D2" alt="gists-readme" width="445" height="100"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![gists-readme&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://gists-readme.yizack.com/api?user=yizack&amp;amp;n=2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://gist.github.com/Yizack)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Card Example 3
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;user&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Cy4Bot&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;n&lt;/td&gt;
&lt;td&gt;&lt;code&gt;20&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;title&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Cy4Bot Gists&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Result
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/Cy4Bot" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgists-readme.yizack.com%2Fapi%3Fuser%3DCy4Bot%26n%3D20%26title%3DCy4Bot%2BGists" alt="gists-readme" width="445" height="325"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![gists-readme&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://gists-readme.yizack.com/api?user=Cy4Bot&amp;amp;n=20&amp;amp;title=Cy4Bot+Gists&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://gist.github.com/Cy4Bot)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Gists Pin
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Parameters
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Optional&lt;/th&gt;
&lt;th&gt;Default value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;user&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your GitHub profile username.&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;id&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your Gist ID&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;owner&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shows the owner of the gist,&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;theme&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sets the theme of the pin.&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;default&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Pin Example 1
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;user&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yizack&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;id&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bbfce31e0217a3689c8d961a356cb10d&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Result
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/Yizack/bbfce31e0217a3689c8d961a356cb10d" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgists-readme.yizack.com%2Fapi%2Fpin%3Fuser%3Dyizack%26id%3Dbbfce31e0217a3689c8d961a356cb10d" alt="gists-readme" width="400" height="195"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![gists-readme&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://gists-readme.yizack.com/api/pin?user=yizack&amp;amp;id=bbfce31e0217a3689c8d961a356cb10d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://gist.github.com/Yizack/bbfce31e0217a3689c8d961a356cb10d)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Pin Example 2
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;user&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yizack&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;id&lt;/td&gt;
&lt;td&gt;&lt;code&gt;8a84dabef525fed523573b47258880e0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;owner&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;theme&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dark&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Result
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/Yizack/8a84dabef525fed523573b47258880e0" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgists-readme.yizack.com%2Fapi%2Fpin%3Fuser%3Dyizack%26id%3D8a84dabef525fed523573b47258880e0%26owner%3Dtrue%26theme%3Ddark" alt="gists-readme" width="400" height="120"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![gists-readme&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://gists-readme.yizack.com/api/pin?user=yizack&amp;amp;id=8a84dabef525fed523573b47258880e0&amp;amp;owner=true&amp;amp;theme=dark&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://gist.github.com/Yizack/8a84dabef525fed523573b47258880e0)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inspired by &lt;a href="https://github.com/anuraghazra/github-readme-stats" rel="noopener noreferrer"&gt;anuraghazra/github-readme-stats&lt;/a&gt;.&lt;br&gt;
Hosted on &lt;a href="https://vercel.com/" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt; with Node.js.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>github</category>
      <category>tutorial</category>
      <category>node</category>
    </item>
    <item>
      <title>Embeddable Music Player</title>
      <dc:creator>Yizack Rangel</dc:creator>
      <pubDate>Wed, 15 Jun 2022 05:49:11 +0000</pubDate>
      <link>https://dev.to/yizack/embeddable-music-player-1p53</link>
      <guid>https://dev.to/yizack/embeddable-music-player-1p53</guid>
      <description>&lt;p&gt;Embed a simple HTML music player from local audio on your website using &lt;a href="https://www.mediaelementjs.com/" rel="noopener noreferrer"&gt;MediaElement.js&lt;/a&gt; and &lt;a href="https://lokeshdhakar.com/projects/color-thief/" rel="noopener noreferrer"&gt;Color Thief&lt;/a&gt;. Inspired by Spotify's embed player.&lt;/p&gt;

&lt;p&gt;(Fullscreen Live &lt;a href="https://embeddable-music-player.yizack.com/player/just-stay.html" rel="noopener noreferrer"&gt;Demo&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/yizack/embed/KKQJQej?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Recommended requeriments
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Mp3 audio source.&lt;/li&gt;
&lt;li&gt;Square image.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Clone or download my repository (&lt;a href="https://github.com/Yizack/embeddable-music-player" rel="noopener noreferrer"&gt;Yizack/embeddable-music-player&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit the file &lt;a href="https://github.com/Yizack/embeddable-music-player/blob/master/player/song.html" rel="noopener noreferrer"&gt;&lt;code&gt;/player/song.html&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paste your song name in &lt;code&gt;{SONG-NAME}&lt;/code&gt; for the title of your page.&lt;/li&gt;
&lt;li&gt;Paste your audio file URL in &lt;code&gt;{MP3-SOURCE}&lt;/code&gt; for the audio that will be played when you press the play button.&lt;/li&gt;
&lt;li&gt;Paste your image URL in &lt;code&gt;{ARTWORK}&lt;/code&gt; for the image that will be displayed.&lt;/li&gt;
&lt;li&gt;You can also rename or create a new html file to have different players, for example for the live demo I have &lt;a href="https://embeddable-music-player.yizack.com/player/just-stay.html" rel="noopener noreferrer"&gt;&lt;code&gt;/player/just-stay.html&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Color Thief will detect automatically the dominant color of your song image for your player.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Use the code below, replace &lt;code&gt;{YOUR-HTML-PLAYER}&lt;/code&gt; with your HTML filename inside the folder &lt;a href="https://github.com/Yizack/embeddable-music-player/blob/master/player" rel="noopener noreferrer"&gt;&lt;code&gt;/player&lt;/code&gt;&lt;/a&gt; and paste it on your site where you want your audio player to appear.&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;  &lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/player/{YOUR-HTML-PLAYER}.html"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"300"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"385"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Example of use on a website using iframes: &lt;a href="https://dimatis.yizack.com" rel="noopener noreferrer"&gt;Dimatis Website&lt;/a&gt;)&lt;br&gt;
  &lt;a href="https://dimatis.yizack.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgxswuigwwo0w09hozvq0.jpg" alt="Live Demo" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Thanks to the responsiveness you can play with the width and height as you want.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;  &lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/player/{YOUR-HTML-PLAYER}.html"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"100%"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"450"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Another example of use on a website using iframes: &lt;a href="https://dimatis.yizack.com/music/fly-again" rel="noopener noreferrer"&gt;Dimatis - Fly Again&lt;/a&gt;)&lt;br&gt;
  &lt;a href="https://dimatis.yizack.com/music/fly-again" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9vxng4r6m71p8m8dcdry.jpg" alt="Live Demo" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>javascript</category>
      <category>css</category>
      <category>music</category>
    </item>
  </channel>
</rss>
