jekyll-theme-plain 0.7.0 → 0.8.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: 70f527c37f1fcd83cc5d926a394191ba5268447ebfede25f99a44fa5cd477a02
4
- data.tar.gz: 28a753a37b511579610f8203d9428c89b2af485df69402d37a6ecd628d29f79e
3
+ metadata.gz: 5a72865e582925043c4472a195ff1e02ced4986d45145ad5821effe5c77c51b5
4
+ data.tar.gz: f79ce66bf86817636ef9bd9e26da58a7daa4909343ce7f76e4d964e6fad4ed54
5
5
  SHA512:
6
- metadata.gz: 95661246204f2f3f132354c605fe0750f82f396a317c5a9becba8e8a71fcb344b3acbba023958339c3ff6b6085fc2aeb5ad1d641f7251b758e2aa17709445b6b
7
- data.tar.gz: 4cfef2ec3dbb8826163fc8c86274d9cab56ce65b0e466545f6a0bf6b34850d2d88da5814754bad3a4781f99da8837807e4c7a13272f0e2e35dda8d15fad9c738
6
+ metadata.gz: a27dc552b23ee4df4210f6991f991941a1af0ed112aa731653085cb2cc49afdcf448460dc3ddd53e14aea91dd2b7f691e20417a06b053932cce8adf875ff5d4a
7
+ data.tar.gz: 9b3c891b67289a69acce29d3e3389f3af5abda25e34ef6f549f15c5cfb986365003bfa8e5f51467f789fa0dad65b527963892fdf6e7a5cf8deb4a49748d028dc
data/README.md CHANGED
@@ -26,7 +26,7 @@ See the template's [_config.yml](https://github.com/jekyll-theme-plain/blog/blob
26
26
  ## Layouts
27
27
 
28
28
  * [default](_layouts/default.html) (aliases: base, home, page)
29
- * [plain](_layouts/plain.html) (alias: post)
29
+ * [post](_layouts/post.html)
30
30
 
31
31
  ## Includes
32
32
 
data/_includes/head.html CHANGED
@@ -8,11 +8,8 @@
8
8
 
9
9
  {%- if viewport %}
10
10
  <meta name="viewport" content="{{- viewport -}}">
11
- {%- endif -%}
12
-
13
- {%- if title %}
11
+ {%- endif %}
14
12
  <title>{{- title -}}</title>
15
- {%- endif -%}
16
13
 
17
14
  {%- if canonical_url %}
18
15
  <link rel="canonical" href="{{- canonical_url -}}">
@@ -22,7 +19,7 @@
22
19
  <link rel="license" href="{{- license_url -}}">
23
20
  {%- endif -%}
24
21
 
25
- {%- if stylesheets.size > 0 %}
22
+ {%- if stylesheets and stylesheets.size > 0 %}
26
23
  <style>
27
24
  {%- for stylesheet in stylesheets -%}
28
25
  {%- include {{ stylesheet }} -%}
@@ -0,0 +1,6 @@
1
+
2
+ pre {
3
+ word-wrap: break-word;
4
+ overflow-wrap: break-word;
5
+ white-space: pre-wrap;
6
+ }
@@ -1,8 +1,8 @@
1
1
  {%- comment -%}
2
- # Whether the page is in the plain layout.
2
+ # Whether the page is a post.
3
3
  {%- endcomment -%}
4
- {%- if page.layout == "plain" or page.layout == "post" -%}
5
- {%- assign is_plain = true -%}
4
+ {%- if page.layout == "post" -%}
5
+ {%- assign is_post = true -%}
6
6
  {%- endif -%}
7
7
 
8
8
  {%- comment -%}
@@ -12,10 +12,10 @@
12
12
  {%- assign default_charset = "utf-8" -%}
13
13
  {%- assign default_color_scheme = "light dark" -%}
14
14
  {%- assign default_viewport = "width=device-width, initial-scale=1" -%}
15
- {%- assign default_title = "" -%}
15
+ {%- assign default_title = nil -%}
16
16
  {%- assign default_canonical_url = page.url | absolute_url -%}
17
- {%- assign default_license_url = false -%}
18
- {%- assign default_stylesheets = "" | split: ", " -%}
17
+ {%- assign default_license_url = nil -%}
18
+ {%- assign default_stylesheets = nil -%}
19
19
 
20
20
  {%- comment -%}
21
21
  # Lang.
@@ -55,7 +55,14 @@
55
55
  {%- comment -%}
56
56
  # Title.
57
57
  {%- endcomment -%}
58
- {%- if is_plain -%}
58
+ {%- assign title = page.title -%}
59
+ {%- if title == nil -%}{%- assign title = site.title -%}
60
+ {%- if title == nil -%}{%- assign title = default_title -%}{%- endif -%}{%- endif -%}
61
+
62
+ {%- comment -%}
63
+ # If the title is empty, sets the canonical URL as the title.
64
+ {%- endcomment -%}
65
+ {%- if title.size == 0 -%}
59
66
  {%-
60
67
  assign title =
61
68
  canonical_url
@@ -64,10 +71,6 @@
64
71
  | remove_first: "https://"
65
72
  | remove_first: "http://"
66
73
  -%}
67
- {%- else -%}
68
- {%- assign title = page.title -%}
69
- {%- if title == nil -%}{%- assign title = site.title -%}
70
- {%- if title == nil -%}{%- assign title = default_title -%}{%- endif -%}{%- endif -%}
71
74
  {%- endif -%}
72
75
 
73
76
  {%- comment -%}
data/_layouts/post.html CHANGED
@@ -1,5 +1,11 @@
1
1
  ---
2
- layout: plain
2
+ layout: default
3
3
  ---
4
4
 
5
- {{- content -}}
5
+ <pre>
6
+ {{-
7
+ content
8
+ | xml_escape
9
+ | replace: "&apos;", "&#39;"
10
+ -}}
11
+ </pre>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-plain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yuuki
@@ -42,14 +42,13 @@ files:
42
42
  - _includes/directory-listing.html
43
43
  - _includes/head.html
44
44
  - _includes/page-listing.html
45
- - _includes/plain.css
46
45
  - _includes/post-listing.html
46
+ - _includes/post.css
47
47
  - _includes/variables.html
48
48
  - _layouts/base.html
49
49
  - _layouts/default.html
50
50
  - _layouts/home.html
51
51
  - _layouts/page.html
52
- - _layouts/plain.html
53
52
  - _layouts/post.html
54
53
  homepage: https://github.com/jekyll-theme-plain/jekyll-theme-plain
55
54
  licenses:
data/_includes/plain.css DELETED
@@ -1,4 +0,0 @@
1
-
2
- pre {
3
- white-space: pre-wrap;
4
- }
data/_layouts/plain.html DELETED
@@ -1,11 +0,0 @@
1
- ---
2
- layout: default
3
- ---
4
-
5
- <pre>
6
- {{-
7
- content
8
- | xml_escape
9
- | replace: "&apos;", "&#39;"
10
- -}}
11
- </pre>