jekyll-theme-plain 0.6.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: f793a987d354ef1a7dade2cf0cc37aa2dd651ce366977f5b45a98fa75f0ae163
4
- data.tar.gz: f1b532f806b94f58d8ac50079491bd1216973bb92e688f38922cfa5b934ec2cc
3
+ metadata.gz: 5a72865e582925043c4472a195ff1e02ced4986d45145ad5821effe5c77c51b5
4
+ data.tar.gz: f79ce66bf86817636ef9bd9e26da58a7daa4909343ce7f76e4d964e6fad4ed54
5
5
  SHA512:
6
- metadata.gz: e008f833e42b1ca5ff6e0b82a264ac3a63e5826a8255d065846bc145926c312897ad3b7290691eb0804145080f466aba6958eeef7eb421e5c3522babb4f5f1e3
7
- data.tar.gz: 9bc5ce0f7939d9438432ef9009015f8fc3c4ab731855b930456b3af605aca3525b19e51dae5a253f3d4dee9669d5f39b0312bf66034deb3cdd232ccd71026aeb
6
+ metadata.gz: a27dc552b23ee4df4210f6991f991941a1af0ed112aa731653085cb2cc49afdcf448460dc3ddd53e14aea91dd2b7f691e20417a06b053932cce8adf875ff5d4a
7
+ data.tar.gz: 9b3c891b67289a69acce29d3e3389f3af5abda25e34ef6f549f15c5cfb986365003bfa8e5f51467f789fa0dad65b527963892fdf6e7a5cf8deb4a49748d028dc
data/README.md CHANGED
@@ -2,8 +2,36 @@
2
2
 
3
3
  Plain is a plain text-like Jekyll theme for GitHub Pages.
4
4
 
5
- ## Templates
5
+ ## Usage
6
+
7
+ ### Templates
8
+
9
+ You can use the following templates:
6
10
 
7
11
  * [blog](https://github.com/jekyll-theme-plain/blog)
8
12
  * [directory-listing](https://github.com/jekyll-theme-plain/directory-listing)
9
13
  * [single-page](https://github.com/jekyll-theme-plain/single-page)
14
+
15
+ ### Manual setup
16
+
17
+ <details>
18
+ <summary>[show]</summary>
19
+
20
+ To set up manually, add the following to your `_config.yml`:
21
+
22
+ remote_theme: jekyll-theme-plain/jekyll-theme-plain
23
+
24
+ See the template's [_config.yml](https://github.com/jekyll-theme-plain/blog/blob/main/_config.yml) for options.
25
+
26
+ ## Layouts
27
+
28
+ * [default](_layouts/default.html) (aliases: base, home, page)
29
+ * [post](_layouts/post.html)
30
+
31
+ ## Includes
32
+
33
+ * [directory-listing.html](_includes/directory-listing.html)
34
+ * [page-listing.html](_includes/page-listing.html)
35
+ * [post-listing.html](_includes/post-listing.html)
36
+
37
+ </details>
File without changes
@@ -1,11 +1,10 @@
1
1
  {%-
2
- assign files =
2
+ assign html_files =
3
3
  site.static_files
4
4
  | where_exp: "file", "file.extname contains '.htm'"
5
5
  -%}
6
-
7
- {%- if files.size > 0 %} <ul>
8
- {%- for file in files -%}
6
+ {%- if html_files.size > 0 %} <ul>
7
+ {%- for file in html_files -%}
9
8
  {%-
10
9
  assign path =
11
10
  file.path
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,9 +19,11 @@
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 }} -%}
29
26
  {%- endfor %} </style>
30
27
  {%- endif -%}
28
+
29
+ {%- include custom-head.html -%}
@@ -1,8 +1,8 @@
1
1
  {%- if site.pages.size > 0 %} <ul>
2
- {%- for page in site.pages %}
2
+ {%- for p in site.pages %}
3
3
  <li>
4
- <a href="{{- page.url -}}">
5
- {{- page.slug -}}
4
+ <a href="{{- p.url | remove_first: page.url -}}">
5
+ {{- p.slug -}}
6
6
  </a>
7
7
  </li>
8
8
  {%- endfor %}
@@ -1,8 +1,8 @@
1
1
  {%- if site.posts.size > 0 %} <ul>
2
- {%- for post in site.posts %}
2
+ {%- for p in site.posts %}
3
3
  <li>
4
- <a href="{{- post.url | remove_first: page.url -}}">
5
- {{- post.slug -}}
4
+ <a href="{{- p.url | remove_first: page.url -}}">
5
+ {{- p.slug -}}
6
6
  </a>
7
7
  </li>
8
8
  {%- endfor %}
data/_includes/post.css CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
2
  pre {
3
+ word-wrap: break-word;
4
+ overflow-wrap: break-word;
3
5
  white-space: pre-wrap;
4
6
  }
@@ -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_post -%}
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 -%}
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.6.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yuuki
@@ -11,47 +11,25 @@ cert_chain: []
11
11
  date: 2024-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: github-pages
14
+ name: jekyll
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '230'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '230'
27
- - !ruby/object:Gem::Dependency
28
- name: webrick
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
19
+ version: '3.5'
20
+ - - "<"
32
21
  - !ruby/object:Gem::Version
33
- version: '1.7'
22
+ version: '5.0'
34
23
  type: :runtime
35
24
  prerelease: false
36
25
  version_requirements: !ruby/object:Gem::Requirement
37
26
  requirements:
38
- - - "~>"
27
+ - - ">="
39
28
  - !ruby/object:Gem::Version
40
- version: '1.7'
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '2.5'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
29
+ version: '3.5'
30
+ - - "<"
53
31
  - !ruby/object:Gem::Version
54
- version: '2.5'
32
+ version: '5.0'
55
33
  description:
56
34
  email:
57
35
  executables: []
@@ -60,6 +38,7 @@ extra_rdoc_files: []
60
38
  files:
61
39
  - LICENSE
62
40
  - README.md
41
+ - _includes/custom-head.html
63
42
  - _includes/directory-listing.html
64
43
  - _includes/head.html
65
44
  - _includes/page-listing.html