benjeto-jekyll-theme 0.1.6 → 0.2.0

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: 79afcabc59cc1578e48a1fac4529fe9327b40504821962e244220e162a78910f
4
- data.tar.gz: bb8f3d9d09872f7e75931130b1d4316eb6862337dad505d9f874223604de53c6
3
+ metadata.gz: 5a9ed02d1bd33721f7c910780161220bf6cef9625c043c1f22dd459637067f82
4
+ data.tar.gz: 51600f835363b0d43d1b2ab99cb837179781af46c5109162b850043494791a82
5
5
  SHA512:
6
- metadata.gz: 1431f4b5656e90544251583c6b1b2d6c09edba80e0580815af309561678371be2dbc994a0a4257cc977acf3f5d372f761107e486fae20df1c8d3c71d514338fd
7
- data.tar.gz: 843f3afe5bb3b6988855004cd3d725aa244ae5e9b4675b01ab8a8bfa91b802dd27115561ba06ecdc0f68c5d05f9d99141a87eb448bf19f330996d14550e75fae
6
+ metadata.gz: 5f93df93718acdba45617d26d97121609f86049938f284da1aaafa69f14de10a60c4c124c2b1dd5ccd397f31cffaf470474fcd6f1a00096ae650f646390f2e83
7
+ data.tar.gz: 634b1b97912f566161fa8888e7a405a13485b27a03bf733ff3094c90f8e7a341e678d47f34bdde81d6d82e668c116ba8443207c5b27aead475df77626c3cb32d
data/README.md CHANGED
@@ -8,7 +8,7 @@ This theme is perfect for sharing short posts or updates as well as long article
8
8
  - Supports multilingual functionality with [jekyll-polyglot](https://github.com/untra/polyglot), including RTL.
9
9
  - Compatible with [jekyll-paginate](https://github.com/jekyll/jekyll-paginate) and [jekyll-paginate-v2](https://github.com/sverrirs/jekyll-paginate-v2).
10
10
 
11
- [Sample website is here](https://benjeto.pages.dev).
11
+ [Sample website is here](https://benjeto.tsg0o0.com).
12
12
 
13
13
  ## Installation
14
14
 
@@ -3,7 +3,11 @@
3
3
  <img src="{{ include.icon | relative_url }}" class="app-icon" aria-hidden="true" alt="">
4
4
  {%- endif %}
5
5
  <div class="app-info">
6
+ {%- if include.type == "title" %}
7
+ <h1>{{ include.title }}</h1>
8
+ {%- else %}
6
9
  <b>{{ include.title }}</b>
10
+ {%- endif %}
7
11
  {{ include.description }}
8
12
  </div>
9
13
  </div>
@@ -1,8 +1,13 @@
1
1
  {%- assign texts = site.data.texts %}
2
+ {%- assign settings = site.data.settings %}
2
3
  {%- if include.category -%}
3
4
  <span class="category">
4
5
  {%- for category in include.category -%}
6
+ {%- if settings.categories[category] and include.link == true -%}
7
+ <a class="category" href="{{ settings.categories[category].url | relative_url }}">{{ settings.categories[category].name | default: texts.categories[category] | default: category }}</a>
8
+ {%- else -%}
5
9
  {{ texts.categories[category] | default: category }}
10
+ {%- endif -%}
6
11
  {%- if forloop.last == false %}, {% endif -%}
7
12
  {%- endfor -%}
8
13
  </span>
data/_includes/head.html CHANGED
@@ -74,10 +74,14 @@
74
74
  <link rel="icon" href="{{ settings.head.favicon | relative_url | default: profile.icon | relative_url }}">
75
75
  {% endif -%}
76
76
 
77
- {% if page.noindex == true or settings.head.noindex == true or site.plugins contains "jekyll-polyglot" and page.lang != site.active_lang and page.layout != "home" -%}
77
+ {% if page.noindex == true or page.hidden == true or settings.head.noindex == true or site.plugins contains "jekyll-polyglot" and page.lang != site.active_lang and page.layout != "home" -%}
78
78
  <meta name="robots" content="noindex">
79
79
  {% endif -%}
80
80
 
81
+ {% if settings.head.canonical -%}
82
+ <link rel="canonical" href="{{ settings.head.canonical }}{{ page.url }}">
83
+ {% endif -%}
84
+
81
85
  {% if page.itunes_app -%}
82
86
  <meta name="apple-itunes-app" content="app-id={{ page.itunes_app }}">
83
87
  {% endif -%}
@@ -1,9 +1,10 @@
1
1
  {%- assign texts = site.data.texts %}
2
2
  {% assign rtl_languages = "ar,arc,dv,fa,he,ks,nqo,ps,syr,ur,yi" | split: ',' %}
3
- {%- if page.lang-exclusive.size > 1 or page.lang-exclusive == nil %}
3
+ {% assign languages = page.lang-exclusive | default: site.languages %}
4
+ {%- if languages.size > 1 or page.lang-exclusive == nil %}
4
5
  <ul class="lang-select">
5
- {%- for lang in site.languages %}
6
- {%- if page.lang-exclusive contains lang or page.lang-exclusive == nil %}
6
+ {%- for lang in languages %}
7
+ {%- if languages contains lang or languages == nil %}
7
8
  <li><a {% static_href %}href="
8
9
  {%- if lang == site.default_lang -%}
9
10
  {{ page.url | relative_url | replace: 'index.html', '' }}
@@ -5,7 +5,7 @@
5
5
  <article class="feed-post pagebox"{% if post.lang %} lang="{{ post.lang }}"{% endif %}>
6
6
  <div class="post-excerpt">
7
7
  <a href="{{ post.url | relative_url }}" class="post-link post-lighter">
8
- {%- if post.title != "" %}
8
+ {%- if post.title != "" and post.hide_title != true %}
9
9
  <h2>{{ post.title | escape }}</h2>
10
10
  {%- endif %}
11
11
  {%- if post.title == "" or settings.home.show_excerpts == true %}
data/_includes/tags.html CHANGED
@@ -1,8 +1,13 @@
1
1
  {%- assign texts = site.data.texts %}
2
+ {%- assign settings = site.data.settings %}
2
3
  {%- if include.tags -%}
3
4
  <div class="tags">
4
5
  {%- for entry in include.tags -%}
6
+ {%- if settings.tags[entry] and include.link == true -%}
7
+ <a class="tag" href="{{ settings.tags[entry].url | relative_url }}">{{ settings.tags[entry].name | default: texts.tags[entry] | default: entry }}</a>
8
+ {%- else -%}
5
9
  <span class="tag">{{ texts.tags[entry] | default: entry }}</span>
10
+ {%- endif -%}
6
11
  {%- endfor -%}
7
12
  </div>
8
13
  {%- endif -%}
@@ -3,7 +3,7 @@ layout: base
3
3
  ---
4
4
  <header class="post">
5
5
  {%- include miniprof.html type="nav" -%}
6
- {%- if pagetitle != "" -%}
6
+ {%- if page.title != "" and page.hide_title != true -%}
7
7
  <h1>{{ page.title }}</h1>
8
8
  {%- endif -%}
9
9
  </header>
data/_layouts/home.html CHANGED
@@ -69,23 +69,27 @@ layout: base
69
69
  {%- endif %}
70
70
  {%- endfor %}
71
71
  {%- if tab_found == false %}
72
- <li class="current" aria-selected><a href="{{ page.url }}">{{ page.title }}</a></li>
72
+ <li class="current" aria-selected><a href="{{ page.tab.url | default: page.url | relative_url }}">
73
+ {{- page.tab.title | default: page.title }}</a></li>
73
74
  {%- endif %}
74
75
  </ul>
75
76
  </nav>
76
77
  {%- if tab_found != false %}
77
- {%- if tab_found.description or tab_found.feed %}
78
+ {%- assign tab_info = tab_found %}
79
+ {%- else %}
80
+ {%- assign tab_info = page.tab %}
81
+ {%- endif %}
82
+ {%- if tab_info.description or tab_info.feed %}
78
83
  <div class="tab-description">
79
- {%- if tab_found.description %}
80
- <p>{{ tab_found.description }}</p>
84
+ {%- if tab_info.description or page.description %}
85
+ <p>{{ tab_info.description | default: page.description }}</p>
81
86
  {%- endif %}
82
- {%- if tab_found.feed %}
83
- <a class="menu-btn subscribe" href="{{ tab_found.feed | relative_url }}" title="{{ texts.subscribe_menu }}">{{ texts.subscribe }}</a>
87
+ {%- if tab_info.feed %}
88
+ <a class="menu-btn subscribe" href="{{ tab_info.feed | relative_url }}" title="{{ texts.subscribe_menu }}">{{ texts.subscribe }}</a>
84
89
  {%- endif %}
85
90
  </div>
86
91
  {%- endif %}
87
92
  {%- endif %}
88
- {%- endif %}
89
93
 
90
94
  {%- if page.custom_home != true %}
91
95
  {%- if posts.size > 0 %}
data/_layouts/post.html CHANGED
@@ -5,12 +5,12 @@ layout: base
5
5
  {%- assign settings = site.data.settings -%}
6
6
  <header class="post">
7
7
  {%- include miniprof.html type="nav" -%}
8
- {%- if page.title != "" -%}
8
+ {%- if page.title != "" and page.hide_title != true -%}
9
9
  <h1>{{ page.title }}</h1>
10
10
  {%- endif -%}
11
11
  <div class="meta">
12
- {%- include category.html category=page.category %}
13
- {%- include tags.html tags=page.tag %}
12
+ {%- include category.html category=page.category link=true %}
13
+ {%- include tags.html tags=page.tag link=true %}
14
14
  {%- if page.date or page.update %}
15
15
  <div class="time">
16
16
  {%- assign date_format = page.date_format | default: texts.date_format | default: "%Y-%m-%d" -%}
@@ -38,7 +38,7 @@ article.post {
38
38
  h1, h2, h3 {
39
39
  margin: 20px 0 16px;
40
40
  color: var(--head);
41
- line-height: 1.2;
41
+ line-height: 1.5;
42
42
  font-weight: 600;
43
43
  }
44
44
  h2 {
@@ -131,8 +131,8 @@ code {
131
131
  margin: 0 2px;
132
132
  }
133
133
  pre code {
134
- background: var(--boxbglight);
135
- border-color: var(--boxbglight);
134
+ background: var(--page);
135
+ border-color: var(--page);
136
136
  direction: ltr;
137
137
  display: block;
138
138
  border-radius: 6px;
@@ -140,6 +140,10 @@ pre code {
140
140
  overflow-x: auto;
141
141
  border-width: 1.5px;
142
142
  }
143
+ .pagebox pre code {
144
+ background: var(--bg);
145
+ border-color: var(--bg);
146
+ }
143
147
 
144
148
  details {
145
149
  margin: 16px 0;
@@ -245,7 +249,7 @@ button.shareBtn {
245
249
  }
246
250
 
247
251
 
248
- span.tag {
252
+ .tag {
249
253
  display: inline-block;
250
254
  color: var(--gray);
251
255
  font-size: 0.9em;
@@ -254,8 +258,11 @@ span.tag {
254
258
  border: 1px solid var(--border);
255
259
  border-radius: 16px;
256
260
  }
261
+ a.tag {
262
+ color: var(--link);
263
+ }
257
264
 
258
- span.category {
265
+ .category {
259
266
  display: inline-block;
260
267
  font-weight: 500;
261
268
  margin: 0;
@@ -296,10 +303,13 @@ header.post {
296
303
  div.tags {
297
304
  display: inline-block;
298
305
  margin: 0 4px;
299
- span.tag {
306
+ .tag {
300
307
  margin: 0 4px;
301
308
  }
302
309
  }
310
+ .category a {
311
+ margin-bottom: 0;
312
+ }
303
313
  div.time {
304
314
  display: flex;
305
315
  flex-wrap: wrap;
@@ -330,6 +340,7 @@ div.header {
330
340
  aspect-ratio: 5 / 1;
331
341
  margin-bottom: -8px;
332
342
  background: var(--boxbg);
343
+ border-radius: 0 0 8px 8px;
333
344
  img {
334
345
  vertical-align: bottom;
335
346
  width: 100%;
@@ -396,6 +407,7 @@ header.home {
396
407
  h1 {
397
408
  display: inline-block;
398
409
  font-size: 1.8em;
410
+ line-height: 1.2;
399
411
  margin: 0;
400
412
  }
401
413
  p.bio {
@@ -476,7 +488,7 @@ div.post-custom {
476
488
  }
477
489
  div.tags {
478
490
  display: inline-block;
479
- span.tag {
491
+ .tag {
480
492
  margin-inline-end: 6px;
481
493
  }
482
494
  }
@@ -617,7 +629,7 @@ ul.lang-select {
617
629
  }
618
630
 
619
631
  @media (prefers-contrast: more) {
620
- code, pre code {
632
+ code, pre code, .pagebox pre code {
621
633
  background: var(--bg);
622
634
  border-color: var(--border);
623
635
  }
@@ -8,7 +8,7 @@ img.app-icon {
8
8
  height: 100px;
9
9
  vertical-align: top;
10
10
  margin-inline-end: 16px;
11
- border-radius: 8px;
11
+ border-radius: 16px;
12
12
  flex-grow:0;
13
13
  }
14
14
  div.app-info {
@@ -17,7 +17,7 @@ div.app-info {
17
17
  min-width:166px;
18
18
  line-height: 1.2;
19
19
  margin-bottom: 4px;
20
- h2, h3, b {
20
+ h1, h2, h3, b {
21
21
  display: block;
22
22
  line-height: 1.2;
23
23
  font-size: 1.5em;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benjeto-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cizzuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-13 00:00:00.000000000 Z
11
+ date: 2024-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -39,33 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.17'
41
41
  - !ruby/object:Gem::Dependency
42
- name: jekyll-paginate-v2
42
+ name: jekyll-paginate
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.0
47
+ version: '1.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 3.0.0
55
- - !ruby/object:Gem::Dependency
56
- name: jekyll-polyglot
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 1.8.0
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 1.8.0
54
+ version: '1.1'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: bundler
71
57
  requirement: !ruby/object:Gem::Requirement