jekyll-locales 0.1.11 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/jekyll/locales/hooks/post_render.rb +2 -3
- data/lib/jekyll/locales/site.rb +3 -0
- data/lib/jekyll/locales/version.rb +1 -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: c8b65ad3146ec580ea232959268dc6a07810248987520072e7c3fe9371e3ca84
|
4
|
+
data.tar.gz: a8145521adb95d17fa01a96c2f475854354b7dfa260bc6aa9a56d8caec19a5df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4df12f4cdae5a184e0acd15ab71a237c05b3093b1c70d75199fa08ca911e98d2a97fabfbe0215bbd011d63f331a345e98142c5f1865e75cf2744deecb200a2f
|
7
|
+
data.tar.gz: 963c3f02704d419f8510aced146b02fe394eb1ea1c242a5aaefd7c705997db6d0b4e0e253a9756a934bb10ae8c5c52c506716ea8086fb98e59d4557380b6d1f4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.14
|
4
|
+
|
5
|
+
- Reset `Jekyll::Site#filter_cache`
|
6
|
+
|
7
|
+
## 0.1.13
|
8
|
+
|
9
|
+
- Alternate URLs were adding the locale innecessarily!
|
10
|
+
|
11
|
+
## 0.1.12
|
12
|
+
|
13
|
+
- Reset and setup every site so generators like jekyll-archive are
|
14
|
+
reloaded. Otherwise we may have data copied over from the previous
|
15
|
+
locale.
|
16
|
+
|
3
17
|
## 0.1.11
|
4
18
|
|
5
19
|
- Add alternate URLs to link between languages when using
|
@@ -15,15 +15,14 @@ Jekyll::Hooks.register :site, :post_render do |site|
|
|
15
15
|
next
|
16
16
|
end
|
17
17
|
|
18
|
-
site.
|
19
|
-
next unless doc.is_a? Jekyll::Document
|
18
|
+
site.documents.each do |doc|
|
20
19
|
next if doc.output.nil?
|
21
20
|
next unless doc&.data&.dig 'locales'
|
22
21
|
|
23
22
|
alternate = doc.data['locales'].map do |translation|
|
24
23
|
locale = translation.collection.label
|
25
24
|
# TODO: Every doc should know how to build their own URL
|
26
|
-
doc_url = [url,
|
25
|
+
doc_url = [url, translation.url].join('/')
|
27
26
|
|
28
27
|
%(<link rel="alternate" hreflang="#{locale}" href="#{doc_url}" />)
|
29
28
|
end
|
data/lib/jekyll/locales/site.rb
CHANGED
@@ -27,6 +27,9 @@ module Jekyll
|
|
27
27
|
Jekyll.logger.info 'Base URL:', config['baseurl']
|
28
28
|
|
29
29
|
symlink
|
30
|
+
@filter_cache = {}
|
31
|
+
reset
|
32
|
+
setup
|
30
33
|
process_single
|
31
34
|
# The default locale is placed at the root of the
|
32
35
|
# site and everything else is under a subdirectory, but we symlink
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-locales
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
120
|
+
rubygems_version: 3.3.8
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: Jekyll plugin for localized sites
|