jekyll-hardlinks 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/jekyll/static_file.rb +7 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7504da2189fb3f8b93a566070c7050a6018499bd02e492bf67644bea4421b20d
|
4
|
+
data.tar.gz: 7ed4d75490fdd602be7317ba49f894b667cb401f2d997266d3f162f23ccd2f07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6520877b559881e52c8c58389444fda1d9943545455f21d7b45df7f7e1c1ae0cef223ee49f295ee554c67777d31051066a9536dbaee104e078101732bc63803
|
7
|
+
data.tar.gz: 10d0f22b7fd62d38695b846b114278a80598164a3571ae2c6c1072b9c21ee182eaba4eb93df387b910328b02bd536516c2b9c4034c2e7283c5d8cc764ed3817a
|
data/README.md
CHANGED
@@ -4,8 +4,8 @@ Jekyll copies static files and duplicates storage use. Hard links point
|
|
4
4
|
to the same file instead of making copies, thus saving storage.
|
5
5
|
|
6
6
|
**This plugin only works on file systems that support hard links.** It
|
7
|
-
|
8
|
-
cross-filesystem hard links aren't possible.
|
7
|
+
will fallback to copying files if you're generating the site in another
|
8
|
+
filesystem, since cross-filesystem hard links aren't possible.
|
9
9
|
|
10
10
|
## Installation
|
11
11
|
|
data/lib/jekyll/static_file.rb
CHANGED
@@ -18,7 +18,13 @@ module Jekyll
|
|
18
18
|
self.class.mtimes[path] = mtime
|
19
19
|
|
20
20
|
FileUtils.mkdir_p(File.dirname(dest_path))
|
21
|
-
|
21
|
+
|
22
|
+
begin
|
23
|
+
FileUtils.ln(path, dest_path)
|
24
|
+
rescue Errno::EXDEV
|
25
|
+
Jekyll.logger.warn 'Jekyll::StaticFile', "Cross-device link found, copying to #{dest_path} instead"
|
26
|
+
copy_file(dest_path)
|
27
|
+
end
|
22
28
|
end
|
23
29
|
|
24
30
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-hardlinks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.
|
72
|
+
rubygems_version: 3.3.8
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Saves space by using hard links for static files
|