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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54c81880cbcc03380bb37dd51d45867e933eee78d3375f3cb4d3ad91e9112b99
4
- data.tar.gz: 1711e490f86a58661a557ace3d3dd8235b32449a6a947044f46bdbe0979cdc8e
3
+ metadata.gz: 12ea6328cebd340c5f8b48759962e5b45cb9fe2c0082834dd7e53fb00a614206
4
+ data.tar.gz: c66fa0b8ed57d3d1ccdeb12d03e59e2409df5e406a9337eaad49c673456ae41e
5
5
  SHA512:
6
- metadata.gz: 146340186cc3ce7e89cfcb1a516219d1ccbfa5209945350496eecfd7a28b4b58e3a04b81f42fae127ca0cff5e40065b06dbc0cb7b8e0bf78c56c321a77e8228a
7
- data.tar.gz: f4f11f13796403ff68661f66925950909fc83967939c466c9878fed42da3e1f3d203b7b9f760f08c1d649a08602d391ca198824832f49ccf17d41500f3d99be6
6
+ metadata.gz: 1fdb870f42080d6002d55c415e538646f54456f99701cde27ca5cf15c70b78e1a76433e49bbfda2ba799b37f79ccf36057e1a6aa0bc815cba8790476ddc065b0
7
+ data.tar.gz: 3250eb037d0557c84a69714ed3b49740ae480f8c9719582be6af0fa624faffe96f268a44ded6981a6e3310cd20663e0d3226a0b27bb33b4952cad3fa02cb942f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.13
4
+
5
+ - Alternate URLs were adding the locale innecessarily!
6
+
3
7
  ## 0.1.12
4
8
 
5
9
  - Reset and setup every site so generators like jekyll-archive are
@@ -15,15 +15,14 @@ Jekyll::Hooks.register :site, :post_render do |site|
15
15
  next
16
16
  end
17
17
 
18
- site.each_site_file do |doc|
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, locale, translation.url].join('/')
25
+ doc_url = [url, translation.url].join('/')
27
26
 
28
27
  %(<link rel="alternate" hreflang="#{locale}" href="#{doc_url}" />)
29
28
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Locales
5
- VERSION = '0.1.12'
5
+ VERSION = '0.1.13'
6
6
  end
7
7
  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.12
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: 2020-07-28 00:00:00.000000000 Z
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.0.3
120
+ rubygems_version: 3.1.2
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Jekyll plugin for localized sites