jekyll-hardlinks 0.1.2 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09f07cd36dff9fc8b00a61d3871bf748e67fbba2397d9719ef6884881ebd9b39'
4
- data.tar.gz: 64f2a8022c1ae408d49aafb2b702b0c0dffe0505a10a5b270be069a7e4a08202
3
+ metadata.gz: 7504da2189fb3f8b93a566070c7050a6018499bd02e492bf67644bea4421b20d
4
+ data.tar.gz: 7ed4d75490fdd602be7317ba49f894b667cb401f2d997266d3f162f23ccd2f07
5
5
  SHA512:
6
- metadata.gz: 5fb45122553433a228bfa7ce2079df2f008a09701e730aa68b20389d26ca14fe31f73625552e0b9bd09f6247138e7924bb69452c39547ba65021464fa7325d83
7
- data.tar.gz: 4c9806dc1b41f5e050b6936a4ab45955645ebfbe4a5ae32cdb7034bc59c7cd986501a2748d8a63f53e023bece881a7679fb19629e674e21bf210148e973f8d57
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
- won't work if you're generating the site in another filesystem, since
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
 
@@ -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
- FileUtils.ln(path, dest_path)
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.1.2
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: 2020-12-30 00:00:00.000000000 Z
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.1.2
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