jekyll-codesandbox 0.1.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/code_sandbox.rb +17 -0
- data/lib/jekyll-codesandbox.rb +2 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e134c1787ab588f468d32b666fb18b9aa190d3af4b384944804dff7d2d12fd3b
|
4
|
+
data.tar.gz: f71e46841cb8eaf54ce8b4b719fbf9c3d3c91784ef0f7f0649874a144497c557
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f72996dac47c7f97c0dd36657750b6bb41147ecae5bdd06a916a10eaacf5447fdaf1fef63e15f44a6e081706f382495fdcf284f89e6e6671115c903484afa4d
|
7
|
+
data.tar.gz: ca784cbd76cbd25d1fb63edf168f8fa7fcfd028daa5285ef2a5f46179ed24be246e38ef7cb1557859cb1ee6a391aa1cb9acd562d71f796fc8522d3c0da89768b
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Jekyll
|
2
|
+
class CodeSandbox < Liquid::Tag
|
3
|
+
def initialize(tag_name, link, tokens)
|
4
|
+
super
|
5
|
+
@link = link.strip
|
6
|
+
end
|
7
|
+
|
8
|
+
def render(context)
|
9
|
+
"<iframe src=\"#{@link}?fontsize=14&hidenavigation=1&theme=dark\"
|
10
|
+
style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"
|
11
|
+
title=\"#{@link}\">
|
12
|
+
</iframe>"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
Liquid::Template.register_tag('codesandbox', Jekyll::CodeSandbox)
|
data/lib/jekyll-codesandbox.rb
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
require 'jekyll
|
1
|
+
require 'jekyll'
|
2
|
+
require_relative 'jekyll/code_sandbox'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-codesandbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nelio Carneiro
|
@@ -9,7 +9,21 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2024-11-05 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.3'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.3'
|
13
27
|
description: A Jekyll plugin to embed CodeSandbox projects
|
14
28
|
email:
|
15
29
|
- email@nelio.me
|
@@ -18,6 +32,7 @@ extensions: []
|
|
18
32
|
extra_rdoc_files: []
|
19
33
|
files:
|
20
34
|
- lib/jekyll-codesandbox.rb
|
35
|
+
- lib/jekyll/code_sandbox.rb
|
21
36
|
homepage: https://github.com/neliojrr/jekyll-codesandbox
|
22
37
|
licenses:
|
23
38
|
- MIT
|