0.2.2 • Published 8 years ago

hexo-tag-codepen v0.2.2

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

hexo-tag-codepen NPM version Dependency Status

Hexo tag to embed code snippet from CodePen

Install

Install using npm.

$ npm install hexo-tag-codepen --save

Usage

Create Embedded Pen with following syntax:

  {% codepen userId|anonymous|anon slugHash theme [defaultTab [height [width]]] %}

How to get arguments from CodePen embed

This is something generated by CodePen:

<p data-height="257" data-theme-id="7928" data-slug-hash="cGEqB" data-default-tab="result" class='codepen'>See the Pen <a href='http://codepen.io/timnew/pen/cGEqB/'>cGEqB</a> by TimNew (<a href='http://codepen.io/timnew'>@timnew</a>) on <a href='http://codepen.io'>CodePen</a>.</p>
<script async src="//codepen.io/assets/embed/ei.js"></script>

You can extract required arguments:

FieldValue
userIdtimnew
slugHashcGEqB
theme7928
defaultTabresult
height257
widthThis value should be adjusted according to your blog theme, by default it is 100%

License

MIT

NPM downloads

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago