no-style-please2-plugins 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -5
- data/lib/ext.rb +14 -2
- data/lib/version/version.rb +1 -1
- data/test.rb +12 -3
- 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: e9f4f4a41d85064307365636096162753cb141b2832a40825c7aa90f38ee399c
|
4
|
+
data.tar.gz: 87a751e6931d4a02d7c995eb026f8b8d2a9f81a532a842a7ddbfa1ca4ca4a73a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d373db5377ec0dc015cab2fb94cfd14d2695e970089a062bc73741f9e2119cb40e55b465071b68713fc50047b471ba0857509822ed15e4f3337bb60f35190b38
|
7
|
+
data.tar.gz: 944d77a182c0644d635d89e0e8ab083a4a3a72b54b80e32aa711ea08fe7f805a09a6ff4bf14e74c0de8753f783cef7cf0dd123ae28b4526a98773b76195951a3
|
data/README.md
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
# No::Style::Please2::Plugins
|
2
1
|
|
3
|
-
|
2
|
+
this is jekyll plugin for no-style-please2 theme
|
4
3
|
|
5
|
-
|
4
|
+
## Feature
|
5
|
+
+ tag support, this plugin will create tag page if you add tags in your post
|
6
|
+
+ liquid tags
|
7
|
+
+ post_link ,link to post via title
|
8
|
+
+ img_link ,link to a image
|
9
|
+
+ asset_img insert a picture into the post content
|
10
|
+
+ encryption support. encrypt the post content. you can set password for tag, or set a password in the post front matter. password will be encrypted by ECC cryption.
|
6
11
|
|
7
12
|
## Installation
|
8
13
|
|
@@ -16,7 +21,7 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
16
21
|
|
17
22
|
## Usage
|
18
23
|
|
19
|
-
|
24
|
+
see this [demo](https://vitock.ink/no-style-please-demo/)
|
20
25
|
|
21
26
|
## Development
|
22
27
|
|
@@ -26,4 +31,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
26
31
|
|
27
32
|
## Contributing
|
28
33
|
|
29
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
34
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/vitock/no-style-please2-plugins.
|
data/lib/ext.rb
CHANGED
@@ -27,7 +27,12 @@ module Jekyll
|
|
27
27
|
|
28
28
|
|
29
29
|
def initialize(tag_name, text, tokens)
|
30
|
-
|
30
|
+
arr = text.strip.split(" ")
|
31
|
+
@img_name = arr[0]
|
32
|
+
@img_width = nil
|
33
|
+
if arr.count > 1
|
34
|
+
@img_width = arr[1]
|
35
|
+
end
|
31
36
|
end
|
32
37
|
|
33
38
|
def render(context)
|
@@ -43,7 +48,14 @@ module Jekyll
|
|
43
48
|
if base && base.length
|
44
49
|
link = "#{base}/pics/#{dirPath}/#{@img_name}"
|
45
50
|
end
|
46
|
-
|
51
|
+
|
52
|
+
if @img_width != nil
|
53
|
+
return "<img src='#{link}' style='width:#{@img_width}px'>"
|
54
|
+
else
|
55
|
+
return "![](#{link})"
|
56
|
+
end
|
57
|
+
|
58
|
+
|
47
59
|
end
|
48
60
|
end
|
49
61
|
|
data/lib/version/version.rb
CHANGED
data/test.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: no-style-please2-plugins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vitock
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|