jekyll-whiteglass 1.9.1 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d9cf6026031bbab135d607a04737b2fde8b412396492827e1547097ad28ad51
4
- data.tar.gz: 4dc690f8140ea9a5e7dd6df5322e8a269022c3d040c5a368e7c6fd3bdf000134
3
+ metadata.gz: 3b4992c52206afb599f3d28179239e5ead5fefe6c46c3212596012e0ae3bdf2d
4
+ data.tar.gz: 469c063c0cba1944673f6d8f99b325ed7a6e0e5b81c66930a34b44d636d7ddf4
5
5
  SHA512:
6
- metadata.gz: a62500ea23cdde6172abe0e7da980dbf358c46790a1796e87acff1dbe43882d710f42225f9eb36ff1dcf3f48918b1de84aa5824d36e2c3b7fa15a78443ba4c67
7
- data.tar.gz: 5bd5784496ddd77bf4fe8ee4c16d779789f517f41bf84cf6ed4c3acb1c1227d3c44a1037359dd5e6bad5acc08aae18d245799a439d87cf466a240f505a47d952
6
+ metadata.gz: e6a6bba90501575690af7b537d2d68f7d1621863ed1ad9de3e886d83fc5a725a7156a5b3a9149fdc9112e528c70fa0c1ddc238031eb115778000da010615c03e
7
+ data.tar.gz: 8b0bdfe9708fc0b6ebaf1a3311cea2a3a516ec965a653cd8ae6fa67704e9e0077fcb82b2ba65c00f0d52973eb9afa5c7e00058fd7bd937df28dc15fd95460b27
@@ -1,5 +1,12 @@
1
1
  # ChangeLog
2
2
 
3
+ ## 1.10.0 (2020-08-24)
4
+
5
+ - URL-encode the ampersand in the URL (#32)
6
+ - Internationalization of whiteglass (#11)
7
+ - Added German translation (#11)
8
+ - Add Korean translation
9
+
3
10
  ## 1.9.1 (2019-08-26)
4
11
 
5
12
  - Restore colors of code in blockquotes
data/README.md CHANGED
@@ -35,6 +35,17 @@ 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. Generate a personal access token on <https://github.com/settings/tokens>,
41
+ select `public_repo` or `repo` depending on your repository.
42
+ 4. In the settings page of your repository, go to Secrets tab
43
+ (`https://github.com/<user>/<repo>/settings/secrets`) and add a secret
44
+ `JEKYLL_PAT` with the value of token you got from 3.
45
+ 5. Push some content, then GitHub Actions will generate the site.
46
+
47
+ ## Manual Setup
48
+
38
49
  1. Generate a new Jekyll blog:
39
50
 
40
51
  ``` sh
@@ -75,14 +86,16 @@ gem install jekyll-whiteglass
75
86
  [`index.html`](https://github.com/yous/whiteglass/blob/master/index.html),
76
87
  [`about.md`](https://github.com/yous/whiteglass/blob/master/about.md),
77
88
  [`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)
89
+ [`feed.xml`](https://github.com/yous/whiteglass/blob/master/feed.xml),
90
+ [`robots.txt`](https://github.com/yous/whiteglass/blob/master/robots.txt),
91
+ [`_data/i18n.yml`](https://github.com/yous/whiteglass/blob/master/_data/i18n.yml),
92
+ and [`_data/navigation.yml`](https://github.com/yous/whiteglass/blob/master/_data/navigation.yml)
80
93
  from the theme:
81
94
 
82
95
  ``` sh
83
96
  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
97
+ curl -L -O "https://github.com/yous/whiteglass/raw/master/{index.html,about.md,archives.md,feed.xml,robots.txt}"
98
+ curl -L --create-dirs -o _data/#1 "https://github.com/yous/whiteglass/raw/master/_data/{navigation.yml,i18n.yml}"
86
99
  ```
87
100
 
88
101
  5. Install gems and you're good to go! The blog will be available on
@@ -93,6 +106,14 @@ gem install jekyll-whiteglass
93
106
  bundle exec jekyll serve
94
107
  ```
95
108
 
109
+ ## Upgrading
110
+
111
+ ### From Versions < 1.9.1
112
+
113
+ Copy
114
+ [`_data/i18n.yml`](https://github.com/yous/whiteglass/blob/master/_data/i18n.yml)
115
+ from the theme.
116
+
96
117
  ## Deployment to GitHub Pages using Travis CI
97
118
 
98
119
  This theme uses [jekyll-archives](https://github.com/jekyll/jekyll-archives) gem
@@ -100,8 +121,8 @@ which is [not supported by GitHub Pages](https://help.github.com/articles/config
100
121
  If you want to use full features like categories and tags, I recommend you to
101
122
  use Travis CI or other CI services.
102
123
 
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
124
+ To deploy using Travis CI, first copy the [`.travis.yml`](https://github.com/yous/whiteglass/blob/master/.travis.yml)
125
+ of this repository. You can change `target-branch` (`gh-pages` by default) and
105
126
  `on.branch` (`master` by default) as you want. If you want further
106
127
  customization, see [Travis CI's documentation page](https://docs.travis-ci.com/user/deployment/pages/).
107
128
 
@@ -168,6 +189,8 @@ title: "안녕하세요"
168
189
  lang: ko
169
190
  ```
170
191
 
192
+ 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).
193
+
171
194
  ### Description
172
195
 
173
196
  `site.description` describes the site. This is mainly used in meta descriptions
@@ -0,0 +1,74 @@
1
+ # Welcome to Jekyll!
2
+ #
3
+ # This config file is meant for settings that affect your whole blog, values
4
+ # which you are expected to set up once and rarely edit after that. If you find
5
+ # yourself editing this file very often, consider using Jekyll's data files
6
+ # feature for the data you need to update frequently.
7
+ #
8
+ # For technical reasons, this file is *NOT* reloaded automatically when you use
9
+ # 'jekyll serve'. If you change this file, please restart the server process.
10
+
11
+ # Site settings
12
+ # These are used to personalize your new site. If you look in the HTML files,
13
+ # you will see them accessed via {{ site.title }}, {{ site.author }}, and so on.
14
+ # You can create any custom variable you would like, and they will be accessible
15
+ # in the templates via {{ site.myvariable }}.
16
+ title: whiteglass theme
17
+ author: Yous
18
+ description: Minimal, responsive Jekyll theme for hackers.
19
+ baseurl: "/whiteglass" # the subpath of your site, e.g. /blog
20
+ url: "https://yous.github.io" # the base hostname & protocol for your site, e.g. http://example.com
21
+ lang: en
22
+ timezone: UTC
23
+ exclude:
24
+ - Gemfile
25
+ - Gemfile.lock
26
+ - Rakefile
27
+ - README.md
28
+ - LICENSE.txt
29
+ - CHANGELOG.md
30
+ - jekyll-whiteglass.gemspec
31
+ - screenshot.png
32
+ - vendor
33
+
34
+ # Social media
35
+ twitter_username:
36
+ twitter_image:
37
+ facebook_app_id:
38
+ facebook_image:
39
+ google_analytics:
40
+ comments: false
41
+
42
+ # Plugins
43
+ plugins:
44
+ - jekyll-archives
45
+ - jekyll-paginate
46
+ - jekyll-sitemap
47
+
48
+ # Build settings
49
+ markdown: kramdown
50
+ excerpt_separator: "<!-- more -->"
51
+
52
+ # Outputting
53
+ permalink: /:year/:month/:day/:title/
54
+ paginate_path: /posts/:num/
55
+ paginate: 5
56
+
57
+ # Markdown settings
58
+ kramdown:
59
+ auto_ids: false
60
+ enable_coderay: false
61
+ entity_output: as_char
62
+ footnote_nr: 1
63
+ smart_quotes: lsquo,rsquo,ldquo,rdquo
64
+ toc_levels: 1..6
65
+
66
+ # jekyll-archives
67
+ jekyll-archives:
68
+ enabled:
69
+ - categories
70
+ - tags
71
+ layout: category_archives
72
+ permalinks:
73
+ category: /categories/:name/
74
+ tag: /tags/:name/
@@ -0,0 +1,54 @@
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", "Feber", "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: "댓글"
@@ -0,0 +1,9 @@
1
+ # If you want to link only specific pages in your header, add the path to the
2
+ # pages in order as they should show up.
3
+ main:
4
+ - title: "About"
5
+ url: /about/
6
+ - title: "Archives"
7
+ url: /archives/
8
+ - title: "GitHub"
9
+ url: https://github.com/yous/whiteglass
@@ -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 -%}
@@ -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/css?family=Bitter:400,400i,700&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
 
@@ -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>
@@ -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.0
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: 2020-08-24 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,12 @@ files:
104
104
  - CHANGELOG.md
105
105
  - LICENSE.txt
106
106
  - README.md
107
+ - _config.yml
108
+ - _data/i18n.yml
109
+ - _data/navigation.yml
107
110
  - _includes/category_links.html
108
111
  - _includes/custom_comments_provider.html
112
+ - _includes/date.html
109
113
  - _includes/fonts.html
110
114
  - _includes/footer.html
111
115
  - _includes/footer_content.html
@@ -113,6 +117,7 @@ files:
113
117
  - _includes/head.html
114
118
  - _includes/head_custom.html
115
119
  - _includes/header.html
120
+ - _includes/i18n.html
116
121
  - _includes/pagination.html
117
122
  - _layouts/archive.html
118
123
  - _layouts/category_archives.html
@@ -129,8 +134,12 @@ files:
129
134
  homepage: https://github.com/yous/whiteglass
130
135
  licenses:
131
136
  - MIT
132
- metadata: {}
133
- post_install_message:
137
+ metadata:
138
+ homepage_uri: https://github.com/yous/whiteglass
139
+ source_code_uri: https://github.com/yous/whiteglass
140
+ bug_tracker_uri: https://github.com/yous/whiteglass/issues
141
+ changelog_uri: https://github.com/yous/whiteglass/blob/master/CHANGELOG.md
142
+ post_install_message:
134
143
  rdoc_options: []
135
144
  require_paths:
136
145
  - lib
@@ -145,8 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
154
  - !ruby/object:Gem::Version
146
155
  version: '0'
147
156
  requirements: []
148
- rubygems_version: 3.0.3
149
- signing_key:
157
+ rubygems_version: 3.1.2
158
+ signing_key:
150
159
  specification_version: 4
151
160
  summary: Minimal, responsive Jekyll theme for hackers.
152
161
  test_files: []