jekyll-whiteglass 1.9.1 → 1.10.4

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: 4d9cf6026031bbab135d607a04737b2fde8b412396492827e1547097ad28ad51
4
- data.tar.gz: 4dc690f8140ea9a5e7dd6df5322e8a269022c3d040c5a368e7c6fd3bdf000134
3
+ metadata.gz: a2a2cc2a1b0f66fcf4219c708ee2529c5e234430bb656a83a7a265b85a57861c
4
+ data.tar.gz: f6675e75cccd06e10361b29dd13cf16e28c1c5cf0306c04cfb7321ea105c1581
5
5
  SHA512:
6
- metadata.gz: a62500ea23cdde6172abe0e7da980dbf358c46790a1796e87acff1dbe43882d710f42225f9eb36ff1dcf3f48918b1de84aa5824d36e2c3b7fa15a78443ba4c67
7
- data.tar.gz: 5bd5784496ddd77bf4fe8ee4c16d779789f517f41bf84cf6ed4c3acb1c1227d3c44a1037359dd5e6bad5acc08aae18d245799a439d87cf466a240f505a47d952
6
+ metadata.gz: b6459df2ffd07a68bbb2d8ac53f90b0366b4b39bd0a6a91795f25f50eade7489989521ce4b710bbfe24c250f3da62efc23a57a70f6245d0addbb071a69c21e02
7
+ data.tar.gz: 7c7e59f414215ecd7d0f1b67ed9459bf9e473b497f35460de3825ea1ac9322eeea15d4721f548ed0095163350f6b19e3a7ed43d8564df20e0399d33e7fd9313b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # ChangeLog
2
2
 
3
+ ## 1.10.4 (2021-03-15)
4
+
5
+ - Add French translation (#42)
6
+
7
+ ## 1.10.3 (2021-01-03)
8
+
9
+ - Don't ship _config.yml (#40)
10
+ - Include i18n.yml only under _data for gem
11
+ - Add missing robots.txt
12
+
13
+ ## 1.10.2 (2020-10-16)
14
+
15
+ - Update Google Fonts to v2 API
16
+
17
+ ## 1.10.1 (2020-08-31)
18
+
19
+ - Fix i18n.yml for de-AT (#39)
20
+
21
+ ## 1.10.0 (2020-08-24)
22
+
23
+ - URL-encode the ampersand in the URL (#32)
24
+ - Internationalization of whiteglass (#11)
25
+ - Added German translation (#11)
26
+ - Add Korean translation
27
+
3
28
  ## 1.9.1 (2019-08-26)
4
29
 
5
30
  - Restore colors of code in blockquotes
data/README.md CHANGED
@@ -35,6 +35,12 @@ gem install jekyll-whiteglass
35
35
 
36
36
  ## Quick Start
37
37
 
38
+ 1. Go to [yous/whiteglass-template](https://github.com/yous/whiteglass-template).
39
+ 2. Click "Use this template" button, and then create a repository.
40
+ 3. Push some content, then GitHub Actions will generate the site.
41
+
42
+ ## Manual Setup
43
+
38
44
  1. Generate a new Jekyll blog:
39
45
 
40
46
  ``` sh
@@ -75,14 +81,16 @@ gem install jekyll-whiteglass
75
81
  [`index.html`](https://github.com/yous/whiteglass/blob/master/index.html),
76
82
  [`about.md`](https://github.com/yous/whiteglass/blob/master/about.md),
77
83
  [`archives.md`](https://github.com/yous/whiteglass/blob/master/archives.md),
78
- [`feed.xml`](https://github.com/yous/whiteglass/blob/master/feed.xml), and
79
- [`_data/navigation.yml`](https://github.com/yous/whiteglass/blob/master/_data/navigation.yml)
84
+ [`feed.xml`](https://github.com/yous/whiteglass/blob/master/feed.xml),
85
+ [`robots.txt`](https://github.com/yous/whiteglass/blob/master/robots.txt),
86
+ [`_data/i18n.yml`](https://github.com/yous/whiteglass/blob/master/_data/i18n.yml),
87
+ and [`_data/navigation.yml`](https://github.com/yous/whiteglass/blob/master/_data/navigation.yml)
80
88
  from the theme:
81
89
 
82
90
  ``` sh
83
91
  rm index.md
84
- curl -L -O "https://github.com/yous/whiteglass/raw/master/{index.html,about.md,archives.md,feed.xml}"
85
- curl -L --create-dirs -o _data/navigation.yml https://github.com/yous/whiteglass/raw/master/_data/navigation.yml
92
+ curl -L -O "https://github.com/yous/whiteglass/raw/master/{index.html,about.md,archives.md,feed.xml,robots.txt}"
93
+ curl -L --create-dirs -o _data/#1 "https://github.com/yous/whiteglass/raw/master/_data/{navigation.yml,i18n.yml}"
86
94
  ```
87
95
 
88
96
  5. Install gems and you're good to go! The blog will be available on
@@ -93,6 +101,14 @@ gem install jekyll-whiteglass
93
101
  bundle exec jekyll serve
94
102
  ```
95
103
 
104
+ ## Upgrading
105
+
106
+ ### From Versions < 1.9.1
107
+
108
+ Copy
109
+ [`_data/i18n.yml`](https://github.com/yous/whiteglass/blob/master/_data/i18n.yml)
110
+ from the theme.
111
+
96
112
  ## Deployment to GitHub Pages using Travis CI
97
113
 
98
114
  This theme uses [jekyll-archives](https://github.com/jekyll/jekyll-archives) gem
@@ -100,8 +116,8 @@ which is [not supported by GitHub Pages](https://help.github.com/articles/config
100
116
  If you want to use full features like categories and tags, I recommend you to
101
117
  use Travis CI or other CI services.
102
118
 
103
- To deploy using Travis CI, first copy the [`.travis.yml`](.travis.yml) of this
104
- repository. You can change `target-branch` (`gh-pages` by default) and
119
+ To deploy using Travis CI, first copy the [`.travis.yml`](https://github.com/yous/whiteglass/blob/master/.travis.yml)
120
+ of this repository. You can change `target-branch` (`gh-pages` by default) and
105
121
  `on.branch` (`master` by default) as you want. If you want further
106
122
  customization, see [Travis CI's documentation page](https://docs.travis-ci.com/user/deployment/pages/).
107
123
 
@@ -168,6 +184,8 @@ title: "안녕하세요"
168
184
  lang: ko
169
185
  ```
170
186
 
187
+ The date format and other fixed strings are translated using the `_data/i18n.yml` file. If your language is not yet included, feel free to open a [pull request](https://github.com/yous/whiteglass/pulls).
188
+
171
189
  ### Description
172
190
 
173
191
  `site.description` describes the site. This is mainly used in meta descriptions
data/_data/i18n.yml ADDED
@@ -0,0 +1,70 @@
1
+ en:
2
+ date:
3
+ format: "%b %-d, %Y" # See http://ruby-doc.org/core/Time.html#method-i-strftime for possible date formatting strings
4
+ abbr_day_names: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
5
+ abbr_month_names: ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
6
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dez"]
7
+ day_names: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
8
+ month_names: ["January", "February", "March", "April", "May", "June",
9
+ "July", "August", "September", "October", "November", "December"]
10
+ morelink: "Read on"
11
+ page-older: "Older"
12
+ page-newer: "Newer"
13
+ archive: "Blog Archive"
14
+ archive-category: "Archive of category '%1'"
15
+ archive-tag: "Archive of tag '%1'"
16
+ comments: "Comments"
17
+ de:
18
+ date:
19
+ format: "%e. %B %Y"
20
+ abbr_day_names: ["So", "Mo", "Di", "Mi", "Do", "Fr" , "Sa"]
21
+ abbr_month_names: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun",
22
+ "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"]
23
+ day_names: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"]
24
+ month_names: ["Januar", "Februar", "März", "April", "Mai", "Juni",
25
+ "Juli", "August", "September", "Oktober", "November", "Dezember"]
26
+ morelink: "Weiterlesen"
27
+ page-older: "Ältere Beiträge"
28
+ page-newer: "Neuere Beiträge"
29
+ archive: "Blog Archiv"
30
+ archive-category: "Archiv der Kategorie '%1'"
31
+ archive-tag: "Archiv des Tags '%1'"
32
+ comments: "Kommentare"
33
+ de-AT:
34
+ date:
35
+ month_names: ["Jänner", "Februar", "März", "April", "Mai", "Juni",
36
+ "Juli", "August", "September", "Oktober", "November", "Dezember"]
37
+ abbr_month_names: ["Jän", "Feb", "Mär", "Apr", "Mai", "Jun",
38
+ "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"]
39
+ ko:
40
+ date:
41
+ format: "%Y년 %-m월 %-d일"
42
+ abbr_day_names: ["일", "월", "화", "수", "목", "금", "토"]
43
+ abbr_month_names: ["1월", "2월", "3월", "4월", "5월", "6월",
44
+ "7월", "8월", "9월", "10월", "11월", "12월"]
45
+ day_names: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일", "일요일"]
46
+ month_names: ["1월", "2월", "3월", "4월", "5월", "6월",
47
+ "7월", "8월", "9월", "10월", "11월", "12월"]
48
+ morelink: "계속 읽기"
49
+ page-older: "이전"
50
+ page-newer: "다음"
51
+ archive: "블로그 아카이브"
52
+ archive-category: "'%1' 카테고리 아카이브"
53
+ archive-tag: "'%1' 태그 아카이브"
54
+ comments: "댓글"
55
+ fr:
56
+ date:
57
+ format: "%-d %B %Y"
58
+ abbr_day_names: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"]
59
+ abbr_month_names: ["Jan", "Fev", "Mar", "Avr", "Mai", "Jui",
60
+ "Jui", "Aou", "Sep", "Oct", "Nov", "Dec"]
61
+ day_names: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"]
62
+ month_names: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin",
63
+ "Juillet", "Aout", "Septembre", "Octobre", "Novembre", "Décembre"]
64
+ morelink: "Lire plus"
65
+ page-older: "Plus ancien"
66
+ page-newer: "Récent"
67
+ archive: "Archives"
68
+ archive-category: "Archives de la catégorie '%1'"
69
+ archive-tag: "Archives du tag '%1'"
70
+ comments: "Commentaires"
@@ -1,3 +1,3 @@
1
1
  <hr />
2
- <h1>Comments</h1>
2
+ <h1>{% include i18n.html lang=lang value="comments" default="Comments" %}</h1>
3
3
  <p>Insert your custom comment provider like <a href="https://disqus.com">Disqus</a> or <a href="https://posativ.org/isso">Isso</a> here.</p>
@@ -0,0 +1,32 @@
1
+ {%- if include.lang and include.lang != empty -%}
2
+ {%- assign plang = include.lang -%}
3
+ {%- else -%}
4
+ {%- assign plang = page.lang | default: site.lang | default: "en" -%}
5
+ {%- endif -%}
6
+ {%- assign splang = plang | truncate: 2, "" -%}
7
+ {%- if plang != "en" -%}
8
+ {%- assign dateformat = site.data.i18n.[plang].date.format | default: site.data.i18n.[splang].date.format | default: "%b %-d, %Y" -%}
9
+ {%- comment -%} The dateformat is determined based on the language. Now replace required variables (for now we ignore time based variables (%p, %P)) {%- endcomment -%}
10
+ {%- assign num_month = include.date | date: "%-m" | minus: 1 -%}
11
+ {%- assign num_day = include.date | date: "%w" | plus: 0 -%}
12
+ {%- assign i18n_dateformat = dateformat -%}
13
+ {%- assign abbr_day_name = site.data.i18n.[plang].date.abbr_day_names[num_day] | default: site.data.i18n.[splang].date.abbr_day_names[num_day] -%}
14
+ {%- if abbr_day_name -%}
15
+ {%- assign i18n_dateformat = i18n_dateformat | replace: "%a", abbr_day_name -%}
16
+ {%- endif -%}
17
+ {%- assign day_name = site.data.i18n.[plang].date.day_names[num_day] | default: site.data.i18n.[splang].date.day_names[num_day] -%}
18
+ {%- if day_name -%}
19
+ {%- assign i18n_dateformat = i18n_dateformat | replace: "%A", day_name -%}
20
+ {%- endif -%}
21
+ {%- assign abbr_month_name = site.data.i18n.[plang].date.abbr_month_names[num_month] | default: site.data.i18n.[splang].date.abbr_month_names[num_month] -%}
22
+ {%- if abbr_month_name -%}
23
+ {%- assign i18n_dateformat = i18n_dateformat | replace: "%b", abbr_month_name -%}
24
+ {%- endif -%}
25
+ {%- assign month_name = site.data.i18n.[plang].date.month_names[num_month] | default: site.data.i18n.[splang].date.month_names[num_month] -%}
26
+ {%- if month_name -%}
27
+ {%- assign i18n_dateformat = i18n_dateformat | replace: "%B", month_name -%}
28
+ {%- endif -%}
29
+ {{ include.date | date: i18n_dateformat }}
30
+ {%- else -%}
31
+ {{ include.date | date: "%b %-d, %Y" }}
32
+ {%- endif -%}
data/_includes/fonts.html CHANGED
@@ -1,3 +1,3 @@
1
1
  <link rel="dns-prefetch" href="https://fonts.gstatic.com">
2
2
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
3
- <link href="https://fonts.googleapis.com/css?family=Bitter:400,400i,700&display=swap" rel="stylesheet">
3
+ <link href="https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,400;0,700;1,400&amp;display=swap" rel="stylesheet">
@@ -0,0 +1,17 @@
1
+ {%- capture text -%}
2
+ {%- if include.lang and include.lang != empty -%}
3
+ {%- assign plang = include.lang -%}
4
+ {%- else -%}
5
+ {%- assign plang = page.lang | default: site.lang | default: "en" -%}
6
+ {%- endif -%}
7
+ {%- assign i18n-tag = include.value -%}
8
+ {%- assign splang = plang | truncate: 2, "" -%}
9
+ {%- if site.data.i18n.[plang].[i18n-tag] -%}
10
+ {{ site.data.i18n.[plang].[i18n-tag] }}
11
+ {%- elsif site.data.i18n.[splang].[i18n-tag] -%}
12
+ {{ site.data.i18n.[splang].[i18n-tag] }}
13
+ {%- else -%}
14
+ {{ include.default }}
15
+ {%- endif -%}
16
+ {%- endcapture -%}
17
+ {{ text | strip_newlines }}
@@ -1,11 +1,11 @@
1
1
  {% if paginator.total_pages > 1 %}
2
2
  <div class="pagination">
3
3
  {% if paginator.next_page %}
4
- <a class="previous" href="{{ paginator.next_page_path | relative_url }}">&laquo; Older</a>
4
+ <a class="previous" href="{{ paginator.next_page_path | relative_url }}">&laquo; {% include i18n.html value="page-older" default="Older" %}</a>
5
5
  {% endif %}
6
6
 
7
7
  {% if paginator.previous_page %}
8
- <a class="next" href="{{ paginator.previous_page_path | relative_url }}">Newer &raquo;</a>
8
+ <a class="next" href="{{ paginator.previous_page_path | relative_url }}">{% include i18n.html value="page-newer" default="Newer" %} &raquo;</a>
9
9
  {% endif %}
10
10
  </div>
11
11
  {% endif %}
@@ -3,7 +3,7 @@ layout: default
3
3
  ---
4
4
  <div class="home">
5
5
 
6
- <h1 class="page-heading">Blog Archive</h1>
6
+ <h1 class="page-heading">{% include i18n.html value="archive" default="Blog Archive" %}</h1>
7
7
 
8
8
  {{ content }}
9
9
 
@@ -16,7 +16,7 @@ layout: default
16
16
 
17
17
  <li>
18
18
  <span class="post-meta">
19
- {{ post.date | date: "%b %-d, %Y" }}
19
+ {% include date.html date=post.date lang=lang %}
20
20
  {% if post.categories != empty or post.tags != empty %}
21
21
  {% include category_links.html categories=post.categories tags=post.tags %}
22
22
  {% endif %}
@@ -3,7 +3,10 @@ layout: default
3
3
  ---
4
4
  <div class="home">
5
5
 
6
- <h1 class="page-heading">Archive of {{ page.type }} '{{ page.title | escape }}'</h1>
6
+ {% capture i18n-tag %}archive-{{ page.type }}{% endcapture %}
7
+ {% capture default-title %}Archive of {{ page.type }} '%1'{% endcapture %}
8
+ {% capture title %}{% include i18n.html value=i18n-tag default=default-title %}{% endcapture %}
9
+ <h1 class="page-heading">{{ title | replace: "%1", page.title | escape }}</h1>
7
10
 
8
11
  {% capture site_lang %}{{ site.lang | default: "en" }}{% endcapture %}
9
12
 
data/_layouts/home.html CHANGED
@@ -24,7 +24,7 @@ layout: default
24
24
  </h1>
25
25
 
26
26
  <p class="post-meta">
27
- {{ post.date | date: "%b %-d, %Y" }}
27
+ {% include date.html date=post.date lang=lang %}
28
28
  {% if post.categories != empty or post.tags != empty %}
29
29
  {% include category_links.html categories=post.categories tags=post.tags %}
30
30
  {% endif %}
@@ -39,7 +39,7 @@ layout: default
39
39
  </div>
40
40
  {% if post.content contains site.excerpt_separator %}
41
41
  <p class="post-continue">
42
- <a href="{{ post.url | relative_url }}">Read on &rarr;</a>
42
+ <a href="{{ post.url | relative_url }}">{% include i18n.html lang=lang value="morelink" default="Read on" %} &rarr;</a>
43
43
  </p>
44
44
  {% endif %}
45
45
  </li>
data/_layouts/post.html CHANGED
@@ -9,7 +9,7 @@ layout: default
9
9
  {% else %}
10
10
  <h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
11
11
  {% endif %}
12
- <p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}{% if page.categories != empty or page.tags != empty %}{% include category_links.html categories=page.categories tags=page.tags %}{% endif %}</p>
12
+ <p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{% include date.html date=page.date %}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}{% if page.categories != empty or page.tags != empty %}{% include category_links.html categories=page.categories tags=page.tags %}{% endif %}</p>
13
13
  </header>
14
14
 
15
15
  <div class="post-content" itemprop="articleBody">
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-whiteglass
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chayoung You
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-26 00:00:00.000000000 Z
11
+ date: 2021-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -94,7 +94,7 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- description:
97
+ description:
98
98
  email:
99
99
  - yousbe@gmail.com
100
100
  executables: []
@@ -104,8 +104,10 @@ files:
104
104
  - CHANGELOG.md
105
105
  - LICENSE.txt
106
106
  - README.md
107
+ - _data/i18n.yml
107
108
  - _includes/category_links.html
108
109
  - _includes/custom_comments_provider.html
110
+ - _includes/date.html
109
111
  - _includes/fonts.html
110
112
  - _includes/footer.html
111
113
  - _includes/footer_content.html
@@ -113,6 +115,7 @@ files:
113
115
  - _includes/head.html
114
116
  - _includes/head_custom.html
115
117
  - _includes/header.html
118
+ - _includes/i18n.html
116
119
  - _includes/pagination.html
117
120
  - _layouts/archive.html
118
121
  - _layouts/category_archives.html
@@ -129,8 +132,12 @@ files:
129
132
  homepage: https://github.com/yous/whiteglass
130
133
  licenses:
131
134
  - MIT
132
- metadata: {}
133
- post_install_message:
135
+ metadata:
136
+ homepage_uri: https://github.com/yous/whiteglass
137
+ source_code_uri: https://github.com/yous/whiteglass
138
+ bug_tracker_uri: https://github.com/yous/whiteglass/issues
139
+ changelog_uri: https://github.com/yous/whiteglass/blob/master/CHANGELOG.md
140
+ post_install_message:
134
141
  rdoc_options: []
135
142
  require_paths:
136
143
  - lib
@@ -145,8 +152,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
152
  - !ruby/object:Gem::Version
146
153
  version: '0'
147
154
  requirements: []
148
- rubygems_version: 3.0.3
149
- signing_key:
155
+ rubygems_version: 3.2.3
156
+ signing_key:
150
157
  specification_version: 4
151
158
  summary: Minimal, responsive Jekyll theme for hackers.
152
159
  test_files: []