jekyll-locales 0.3.0rc0 → 0.3.0rc1
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
- checksums.yaml.gz.sig +0 -0
- data/lib/jekyll/locales/site.rb +14 -27
- data/lib/jekyll/locales/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e77ee2e8ebbf1cf1254942a20e6ba6549003510b0a5d40b9fd9ff34a939dde8
|
4
|
+
data.tar.gz: 7316977692b7242ec7fbfa0373590f405f9194ade2e39d61524ae4a720731f79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba762364885dbaa5645c3d28b8dccb346bc0c9ffb04d137aa1761147234b7cb04087f9c3795fd2021df7ed96ead359a3ca3ca81be7524468b9f2d5229c64bcbe
|
7
|
+
data.tar.gz: a71d8ef45f36093cdddc064340ce21cc5e5ce0f0c920a80ad51d0b669a12657ad8401431519615f00bc8029c4d694e1de350751f6b4c7f7a9e0f21285f719d79
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/jekyll/locales/site.rb
CHANGED
@@ -1,27 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'digest'
|
4
|
-
|
5
3
|
module Jekyll
|
6
|
-
# Calculate the config changes based on the _config.yml digest instead
|
7
|
-
# of the contents.
|
8
|
-
class Cache
|
9
|
-
class << self
|
10
|
-
def clear_if_config_changed(_)
|
11
|
-
config = Digest::SHA2.file('_config.yml').hexdigest
|
12
|
-
cache = Jekyll::Cache.new "Jekyll::Cache"
|
13
|
-
return if cache.key?("config_digest") && cache["config_digest"] == config
|
14
|
-
|
15
|
-
Jekyll.logger.warn 'Cache:', 'Config changed, clearing caches'
|
16
|
-
|
17
|
-
clear
|
18
|
-
cache = Jekyll::Cache.new "Jekyll::Cache"
|
19
|
-
cache["config_digest"] = Digest::SHA2.file('_config.yml').hexdigest
|
20
|
-
nil
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
4
|
# Jekyll multilingual support
|
26
5
|
#
|
27
6
|
# * Posts are put under _LANGUAGE/ directories
|
@@ -34,6 +13,18 @@ module Jekyll
|
|
34
13
|
|
35
14
|
# We don't monkey patch because the Site is already instantiated
|
36
15
|
alias process_single process
|
16
|
+
alias original_reset reset
|
17
|
+
|
18
|
+
# Makes sure the configuration is set but it doesn't invalidate the
|
19
|
+
# cache.
|
20
|
+
def reset
|
21
|
+
@original_config ||= Marshal.load(Marshal.dump(config))
|
22
|
+
@config = Marshal.load(Marshal.dump(@original_config))
|
23
|
+
|
24
|
+
original_reset
|
25
|
+
|
26
|
+
locale_config
|
27
|
+
end
|
37
28
|
|
38
29
|
# Process the site once per available locale
|
39
30
|
def process
|
@@ -43,16 +34,12 @@ module Jekyll
|
|
43
34
|
Jekyll.logger.info 'Generating locale:', locale
|
44
35
|
|
45
36
|
locale_create
|
46
|
-
locale_config
|
47
|
-
|
48
|
-
Jekyll.logger.info 'Destination:', config['destination']
|
49
|
-
Jekyll.logger.info 'Base URL:', config['baseurl']
|
50
37
|
|
51
38
|
symlink
|
52
39
|
@filter_cache = {}
|
53
|
-
|
54
|
-
setup
|
40
|
+
|
55
41
|
process_single
|
42
|
+
|
56
43
|
# The default locale is placed at the root of the
|
57
44
|
# site and everything else is under a subdirectory, but we symlink
|
58
45
|
# root to default_locale for compatibility
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-locales
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.0rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
cpurTQHNJfL/ah+9dYbgDXdG5HAAjRMAsWSvERw95YdN9XzQZCdUk5wUs+A6cNtO
|
36
36
|
AZZUMTVYNx8JqUeemxlXBRjsD/s=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2025-03-
|
38
|
+
date: 2025-03-19 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: bundler
|
metadata.gz.sig
CHANGED
Binary file
|