jekyll-crypto 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +4 -0
- data/lib/jekyll/crypto.rb +1 -1
- data/lib/jekyll/crypto/version.rb +2 -2
- data/lib/jekyll/renderer.rb +11 -2
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c244f68e8ba99e94404b86353e875884ab38f7e33e203bf1d4046a6ca5a95245
|
4
|
+
data.tar.gz: 1ac0f13f09bea3e620cc90d668d0da3586e691c1a0988269f3d16190ca9cf89f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8710c518b56ced5ed121ef7987b499746fd5ea78ba01488ac981ba59c37d689747c2ff59784f8dbd9cb8ccdf0f19c43ba3d66f0cf4ca541857fd30036da00993
|
7
|
+
data.tar.gz: e3f6c927325197d3c38081dd78c0d08713c7a3288c7364e43ce714ec2cf0e8c8975698be8fd611d799da9c17b31e10d2d8ecf3a4bc87664c24ebebe0c6c47e2d
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.1.1 - 2020-03-06
|
4
|
+
|
5
|
+
* Prevent password autocompletion
|
6
|
+
|
7
|
+
* Make encryption optional specifying `password: false` in front matter.
|
8
|
+
|
9
|
+
## 0.1.0 - 2020-03-04
|
10
|
+
|
11
|
+
First release! Posts contents are encrypted and authenticated with
|
12
|
+
AES-GCM-256 and passwords are hashed with PBKDF2-SHA256.
|
data/README.md
CHANGED
@@ -44,6 +44,10 @@ version, the decryption parameters and a Javascript snippet that asks
|
|
44
44
|
visitors for a password. If the password is correct, the content is
|
45
45
|
replaced by the plain text version :)
|
46
46
|
|
47
|
+
You can prevent an article from being encrypted by setting password to
|
48
|
+
`false`. It also accepts the string `'false'`. So this means you can't
|
49
|
+
use "false" as a password :P
|
50
|
+
|
47
51
|
## Development
|
48
52
|
|
49
53
|
After checking out the repo, run `bin/setup` to install
|
data/lib/jekyll/crypto.rb
CHANGED
data/lib/jekyll/renderer.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'jekyll/renderer'
|
2
|
-
require 'pry'
|
3
2
|
|
4
3
|
module Jekyll
|
5
4
|
# Renders a Document
|
@@ -14,12 +13,22 @@ module Jekyll
|
|
14
13
|
|
15
14
|
# Encrypts the content before it's placed into the layout tree
|
16
15
|
def place_in_layouts(content, payload, info)
|
17
|
-
|
16
|
+
if encrypt?
|
18
17
|
crypto = Crypto.new(site: site, post: document)
|
19
18
|
crypto.encrypt! && crypto.valid?
|
20
19
|
end
|
21
20
|
|
22
21
|
place_in_layouts_orig document.content, payload, info
|
23
22
|
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def encrypt?
|
27
|
+
return false if document.data['password'] == false
|
28
|
+
return false if document.data['password'] == 'false'
|
29
|
+
return false if document.content.chomp.empty?
|
30
|
+
|
31
|
+
true
|
32
|
+
end
|
24
33
|
end
|
25
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-crypto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -89,8 +89,10 @@ executables: []
|
|
89
89
|
extensions: []
|
90
90
|
extra_rdoc_files:
|
91
91
|
- README.md
|
92
|
+
- CHANGELOG.md
|
92
93
|
- LICENSE.txt
|
93
94
|
files:
|
95
|
+
- CHANGELOG.md
|
94
96
|
- LICENSE.txt
|
95
97
|
- README.md
|
96
98
|
- lib/jekyll-crypto.rb
|