jekyll-locales 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/jekyll/locales/hooks/post_render.rb +2 -3
- 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: 12ea6328cebd340c5f8b48759962e5b45cb9fe2c0082834dd7e53fb00a614206
|
4
|
+
data.tar.gz: c66fa0b8ed57d3d1ccdeb12d03e59e2409df5e406a9337eaad49c673456ae41e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fdb870f42080d6002d55c415e538646f54456f99701cde27ca5cf15c70b78e1a76433e49bbfda2ba799b37f79ccf36057e1a6aa0bc815cba8790476ddc065b0
|
7
|
+
data.tar.gz: 3250eb037d0557c84a69714ed3b49740ae480f8c9719582be6af0fa624faffe96f268a44ded6981a6e3310cd20663e0d3226a0b27bb33b4952cad3fa02cb942f
|
data/CHANGELOG.md
CHANGED
@@ -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
|
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.13
|
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: 2021-11-08 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.1.2
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: Jekyll plugin for localized sites
|