jekyll-koziolekweb-tags 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -2
- data/lib/jekyll/koziolekweb/tags/version.rb +1 -1
- data/lib/jekyll/koziolekweb/tags.rb +17 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed61d38c76920fab927651b97700c9f928937bc3fb5de4670b527b4a017dac07
|
4
|
+
data.tar.gz: 9bb5a329d41433716cd0c69e4d27dd3957e2a23351f909867f3fa5dafd1274f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10f070571ea4cc21926a7010ab24d89013117190b98de610fbbbe2b5c547a5c5eade5c3bf1350b3e86d2249bfa298ab7bf1d4150d1380758a8e4be9e2899fab8
|
7
|
+
data.tar.gz: df3080ae27c1f76239feafcbd56aaf3835e57f5a50428d26c1ea9c070f021c0891e259b6265d289032b7c977c2f4937efb33d3ee727bbf54630e819550c15785
|
data/README.md
CHANGED
@@ -54,13 +54,29 @@ in md file, then it will generate:
|
|
54
54
|
|
55
55
|
```html
|
56
56
|
<p class="listing">Listing X. TITLE</p>
|
57
|
-
|
57
|
+
\```LANG
|
58
58
|
Your code goes here
|
59
|
-
|
59
|
+
\```
|
60
60
|
```
|
61
61
|
|
62
62
|
and finally it will be processed by markdown engine to final form. `X` is an number of listing, starts from 1 and work in post context.
|
63
63
|
|
64
|
+
### yt_video
|
65
|
+
|
66
|
+
This tag helps to embed youtube video:
|
67
|
+
|
68
|
+
```
|
69
|
+
{% yt_video VIDEO_ID %}
|
70
|
+
```
|
71
|
+
|
72
|
+
will generate
|
73
|
+
|
74
|
+
```html
|
75
|
+
<div class="video">
|
76
|
+
<iframe src="https://www.youtube-nocookie.com/embed/VIDEO_ID" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
77
|
+
</div>
|
78
|
+
```
|
79
|
+
|
64
80
|
## Development
|
65
81
|
|
66
82
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to
|
@@ -49,8 +49,24 @@ module Koziolekweb
|
|
49
49
|
"<aside class=\"offtopic f-#{@direction}\">#{content}</aside>"
|
50
50
|
end
|
51
51
|
end
|
52
|
+
|
53
|
+
class YtVideo < Liquid::Tag
|
54
|
+
def initialize(tag_name, video_id, tokens)
|
55
|
+
super
|
56
|
+
@video_id = video_id.strip
|
57
|
+
end
|
58
|
+
|
59
|
+
def render(_context)
|
60
|
+
<<~HTML
|
61
|
+
<div class="video">
|
62
|
+
<iframe src="https://www.youtube-nocookie.com/embed/#{@video_id}" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
63
|
+
</div>
|
64
|
+
HTML
|
65
|
+
end
|
66
|
+
end
|
52
67
|
end
|
53
68
|
end
|
54
69
|
|
55
70
|
Liquid::Template.register_tag('listing', Koziolekweb::Tags::Listing)
|
56
|
-
Liquid::Template.register_tag('offtop', Koziolekweb::Tags::Offtop)
|
71
|
+
Liquid::Template.register_tag('offtop', Koziolekweb::Tags::Offtop)
|
72
|
+
Liquid::Template.register_tag('yt_video', Koziolekweb::Tags::YtVideo)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-koziolekweb-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koziolek
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|