Skip to content

Commit 30fba11

Browse files
authored
Merge pull request #183 from untra/prep-for-1.7.0
Prep for 1.7.0 release
2 parents 55800af + 9884207 commit 30fba11

File tree

342 files changed

+16377
-6340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

342 files changed

+16377
-6340
lines changed

.rubocop.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ Style/RaiseArgs:
6060
Style/SignalException:
6161
Enabled: false
6262

63+
Metrics/PerceivedComplexity:
64+
Max: 15
65+
66+
Metrics/CyclomaticComplexity:
67+
Max: 15
68+
6369
Metrics/AbcSize:
6470
Max: 20
6571

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ If you make any contributions to ruby source code, I will request you add a test
99

1010
In the spec/ directory there are a series of ruby spec files.
1111

12-
run tests with `bundle exec rspec`
12+
run tests with `bundle exec rspec --format RspecJunitFormatter`
1313

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ end
1313

1414
gem 'jekyll'
1515
gem 'jekyll-paginate'
16+
gem 'jekyll-redirect-from'
1617
gem "webrick", "~> 1.7"

Gemfile.lock

Lines changed: 46 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
PATH
22
remote: .
33
specs:
4-
jekyll-polyglot (1.6.0)
4+
jekyll-polyglot (1.7.0)
55
jekyll (>= 4.0, >= 3.0)
66

77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
addressable (2.8.1)
10+
addressable (2.8.5)
1111
public_suffix (>= 2.0.2, < 6.0)
1212
ast (2.4.2)
1313
colorator (1.1.0)
@@ -17,63 +17,69 @@ GEM
1717
eventmachine (>= 0.12.9)
1818
http_parser.rb (~> 0)
1919
eventmachine (1.2.7)
20-
ffi (1.15.5)
20+
ffi (1.16.3)
2121
forwardable-extended (2.6.0)
22+
google-protobuf (3.24.4)
23+
google-protobuf (3.24.4-x86_64-darwin)
2224
http_parser.rb (0.8.0)
23-
i18n (0.9.5)
25+
i18n (1.14.1)
2426
concurrent-ruby (~> 1.0)
25-
jekyll (4.0.1)
27+
jekyll (4.3.2)
2628
addressable (~> 2.4)
2729
colorator (~> 1.0)
2830
em-websocket (~> 0.5)
29-
i18n (>= 0.9.5, < 2)
30-
jekyll-sass-converter (~> 2.0)
31+
i18n (~> 1.0)
32+
jekyll-sass-converter (>= 2.0, < 4.0)
3133
jekyll-watch (~> 2.0)
32-
kramdown (~> 2.1)
34+
kramdown (~> 2.3, >= 2.3.1)
3335
kramdown-parser-gfm (~> 1.0)
3436
liquid (~> 4.0)
35-
mercenary (~> 0.3.3)
37+
mercenary (>= 0.3.6, < 0.5)
3638
pathutil (~> 0.9)
37-
rouge (~> 3.0)
39+
rouge (>= 3.0, < 5.0)
3840
safe_yaml (~> 1.0)
39-
terminal-table (~> 1.8)
41+
terminal-table (>= 1.8, < 4.0)
42+
webrick (~> 1.7)
4043
jekyll-paginate (1.1.0)
41-
jekyll-sass-converter (2.2.0)
42-
sassc (> 2.0.1, < 3.0)
44+
jekyll-redirect-from (0.16.0)
45+
jekyll (>= 3.3, < 5.0)
46+
jekyll-sass-converter (3.0.0)
47+
sass-embedded (~> 1.54)
4348
jekyll-watch (2.2.1)
4449
listen (~> 3.0)
45-
json (2.6.2)
46-
kramdown (2.3.2)
50+
json (2.6.3)
51+
kramdown (2.4.0)
4752
rexml
4853
kramdown-parser-gfm (1.1.0)
4954
kramdown (~> 2.0)
50-
liquid (4.0.3)
51-
listen (3.7.1)
55+
liquid (4.0.4)
56+
listen (3.8.0)
5257
rb-fsevent (~> 0.10, >= 0.10.3)
5358
rb-inotify (~> 0.9, >= 0.9.10)
54-
mercenary (0.3.6)
55-
mini_portile2 (2.8.1)
59+
mercenary (0.4.0)
60+
mini_portile2 (2.8.4)
5661
minitest (5.16.3)
5762
nokogiri (1.13.10)
5863
mini_portile2 (~> 2.8.0)
5964
racc (~> 1.4)
6065
nokogiri (1.13.10-x86_64-darwin)
6166
racc (~> 1.4)
62-
parallel (1.22.1)
63-
parser (3.1.2.1)
67+
parallel (1.23.0)
68+
parser (3.2.2.4)
6469
ast (~> 2.4.1)
70+
racc
6571
pathutil (0.16.2)
6672
forwardable-extended (~> 2.6)
67-
public_suffix (4.0.7)
68-
racc (1.6.2)
73+
public_suffix (5.0.3)
74+
racc (1.7.1)
6975
rainbow (3.1.1)
7076
rake (13.0.6)
7177
rb-fsevent (0.11.2)
7278
rb-inotify (0.10.1)
7379
ffi (~> 1.0)
74-
regexp_parser (2.6.0)
75-
rexml (3.2.5)
76-
rouge (3.26.0)
80+
regexp_parser (2.8.1)
81+
rexml (3.2.6)
82+
rouge (4.1.3)
7783
rspec (3.11.0)
7884
rspec-core (~> 3.11.0)
7985
rspec-expectations (~> 3.11.0)
@@ -83,7 +89,7 @@ GEM
8389
rspec-expectations (3.11.1)
8490
diff-lcs (>= 1.2.0, < 2.0)
8591
rspec-support (~> 3.11.0)
86-
rspec-mocks (3.11.1)
92+
rspec-mocks (3.11.2)
8793
diff-lcs (>= 1.2.0, < 2.0)
8894
rspec-support (~> 3.11.0)
8995
rspec-support (3.11.1)
@@ -99,16 +105,19 @@ GEM
99105
rubocop-ast (>= 1.20.1, < 2.0)
100106
ruby-progressbar (~> 1.7)
101107
unicode-display_width (>= 1.4.0, < 3.0)
102-
rubocop-ast (1.21.0)
103-
parser (>= 3.1.1.0)
104-
ruby-progressbar (1.11.0)
108+
rubocop-ast (1.29.0)
109+
parser (>= 3.2.1.0)
110+
ruby-progressbar (1.13.0)
105111
safe_yaml (1.0.5)
106-
sassc (2.4.0)
107-
ffi (~> 1.9)
108-
terminal-table (1.8.0)
109-
unicode-display_width (~> 1.1, >= 1.1.1)
110-
unicode-display_width (1.8.0)
111-
webrick (1.7.0)
112+
sass-embedded (1.68.0)
113+
google-protobuf (~> 3.23)
114+
rake (>= 13.0.0)
115+
sass-embedded (1.68.0-x86_64-darwin)
116+
google-protobuf (~> 3.23)
117+
terminal-table (3.0.2)
118+
unicode-display_width (>= 1.1.1, < 3)
119+
unicode-display_width (2.5.0)
120+
webrick (1.8.1)
112121

113122
PLATFORMS
114123
ruby
@@ -118,6 +127,7 @@ DEPENDENCIES
118127
jekyll
119128
jekyll-paginate
120129
jekyll-polyglot!
130+
jekyll-redirect-from
121131
minitest (~> 5.16.3)
122132
nokogiri (~> 1.13.10)
123133
rake

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,32 +69,35 @@ In short:
6969

7070

7171
#### Using different permalinks per language
72+
_New in 1.7.0_
7273

73-
Optionally, for those who may want different URLs on different laguages, translations may be identified by specifying a `lang_id` in the frontmatter.
74+
Optionally, for those who may want different URLs on different languages, translations may be identified by specifying a `page_id` in the frontmatter.
7475

75-
If available, polyglot will use `lang_id` and will default to the `permalink` otherwise.
76+
If available, polyglot will use `page_id` to identify the page, and will default to the `permalink` otherwise.
7677

77-
As an example, you may have an about page located in `/about/` while being in `/acerca-de/` in Spanish just by changing the permalink and specifying a `lang_id` that will link the files as translations:
78+
As an example, you may have an about page located in `/about/` while being in `/acerca-de/` in Spanish just by changing the permalink and specifying a `page_id` that will link the files as translations:
7879
```md
7980
---
8081
title: About
81-
permalink: /about/
82+
permalink: /about
8283
lang: en
83-
lang_id: about
84+
page_id: about
8485
---
8586
This is us!
8687
```
8788

8889
```md
8990
---
9091
title: Acerca de
91-
permalink: /acerca-de/
92+
permalink: /acerca-de
9293
lang: es
93-
lang_id: about
94+
page_id: about
9495
---
9596
Estos somos nosotros!
9697
```
9798

99+
Additionally, if you are also using the `jekyll-redirect-from` plugin, pages coordinated this way will automatically have redirects created between pages.
100+
So `/es/about` will automatically redirect to `/es/acerca-de` and `/acerca-de` can redirect to `/about`. If you use this approach, be sure to also employ a customized [redirect.html](https://github.com/untra/polyglot/blob/master/site/_layouts/redirect.html).
98101

99102
#### Fallback Language Support
100103
Lets say you are building your website. You have an `/about/` page written in *english*, *german* and

jekyll-polyglot.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Gem::Specification.new do |s|
22
s.name = 'jekyll-polyglot'
3-
s.version = '1.6.0'
4-
s.date = '2023-06-08'
3+
s.version = '1.7.0'
4+
s.date = '2023-10-29'
55
s.summary = 'I18n plugin for Jekyll Blogs'
66
s.description = 'Fast open source i18n plugin for Jekyll blogs.'
77
s.authors = ['Samuel Volin']

0 commit comments

Comments
 (0)