jekyll-theme-plain 0.2.0 → 0.4.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: a282758ecb1a6fdf8413bfe6e0b184f4adc8da970c2438a345071ca4e5615b5c
4
- data.tar.gz: 98ef0f314fec760ab33a1a18e334a8d9969fac4a10e4726a7b2f1319553d0b56
3
+ metadata.gz: 897177bb52d5ac27186a83fd46e2ad826b8a6dc9b2fd17a584d5131b5b20ee84
4
+ data.tar.gz: 8bf07e180081fcc9b675e0829109e9eb2420f29d1982bec336194813330b8203
5
5
  SHA512:
6
- metadata.gz: be617b5d3e715c5fc00f762360254e3485c9505b6a9a8a59d2de8c8e6b61d91351d6c6619fe20656f190fb13886bddb04f612b52d8b70c0e029f231593b8dfb2
7
- data.tar.gz: c23d0029b71256abb6639c300e7a6288a47e631f4aed6ce13a6d448cc9b68d6efd680cce34ee2d05bbea7918c0516fafeb968ce672264fd769521c17734a4f72
6
+ metadata.gz: b8e08ff4f9155c7ee13b7b68102783a2b9f0b4fbd4f2f995198b7195250efaa92e6a581434629cd172d908e9db0480c95f97fd0a7104e173a7870cef8cac453c
7
+ data.tar.gz: a15e03f511732319f4c8deb5715fb8e48d3299a6e40de66d91afee4cae14cf16b7efdf2e9a375eca414b1a513a5143a6c1d880403ec5669570e0cc8b675c446f
data/README.md CHANGED
@@ -1,7 +1,9 @@
1
- # [Plain](https://jekyll-theme-plain.github.io/)
1
+ # Plain
2
2
 
3
3
  Plain is a plain text-like Jekyll theme for GitHub Pages.
4
4
 
5
- ## Usage
5
+ ## Templates
6
6
 
7
- Copy the [_config.yml](_config.yml) to your repo and edit it.
7
+ * [blog](https://github.com/jekyll-theme-plain/blog)
8
+ * [directory-listing](https://github.com/jekyll-theme-plain/directory-listing)
9
+ * [single-page](https://github.com/jekyll-theme-plain/single-page)
@@ -0,0 +1,20 @@
1
+ {%-
2
+ assign files =
3
+ site.static_files
4
+ | where_exp: "file", "file.extname contains '.htm'"
5
+ -%}
6
+
7
+ {%- if files.size > 0 %} <ul>
8
+ {%- for file in files -%}
9
+ {%-
10
+ assign path =
11
+ file.path
12
+ | remove_first: page.url
13
+ | remove_first: "/index.html"
14
+ %}
15
+ <li>
16
+ <a href="{{- path | append: "/" -}}">{{- path -}}</a>
17
+ </li>
18
+ {%- endfor %}
19
+ </ul>
20
+ {%- endif %}
data/_includes/head.html CHANGED
@@ -1,38 +1,3 @@
1
- {%- comment -%}
2
- # Whether the page is a post.
3
- {%- endcomment -%}
4
- {%- if page.layout == 'post' -%}
5
- {%- assign is_post = true -%}
6
- {%- endif -%}
7
-
8
- {%- assign charset = page.charset -%}
9
- {%- if charset == nil -%}{%- assign charset = site.charset -%}
10
- {%- if charset == nil -%}{%- assign charset = 'utf-8' -%}{%- endif -%}{%- endif -%}
11
-
12
- {%- assign color_scheme = page.color_scheme -%}
13
- {%- if color_scheme == nil -%}{%- assign color_scheme = site.color_scheme -%}
14
- {%- if color_scheme == nil -%}{%- assign color_scheme = 'light dark' -%}{%- endif -%}{%- endif -%}
15
-
16
- {%- assign viewport = page.viewport -%}
17
- {%- if viewport == nil -%}{%- assign viewport = site.viewport -%}
18
- {%- if viewport == nil -%}{%- assign viewport = 'width=device-width, initial-scale=1' -%}{%- endif -%}{%- endif -%}
19
-
20
- {%- assign canonical = page.canonical -%}
21
- {%- if canonical == nil -%}{%- assign canonical = site.canonical -%}
22
- {%- if canonical == nil -%}{%- assign canonical = page.url | absolute_url -%}{%- endif -%}{%- endif -%}
23
-
24
- {%- assign license = page.license -%}
25
- {%- if license == nil -%}{%- assign license = site.license -%}{%- endif -%}
26
-
27
- {%- assign stylesheets = page.stylesheets -%}
28
- {%- if stylesheets == nil -%}
29
- {%- if is_post -%}
30
- {%- assign stylesheets = 'post.css' | split: ',' -%}
31
- {%- else -%}
32
- {%- assign stylesheets = site.stylesheets -%}
33
- {%- endif -%}
34
- {%- endif -%}
35
-
36
1
  {%- if charset %}
37
2
  <meta charset="{{- charset -}}">
38
3
  {%- endif -%}
@@ -43,32 +8,23 @@
43
8
 
44
9
  {%- if viewport %}
45
10
  <meta name="viewport" content="{{- viewport -}}">
46
- {%- endif %}
47
- <title>
48
- {%- if is_post -%}
49
- {{-
50
- canonical
51
- | remove_first: 'https://www.'
52
- | remove_first: 'http://www.'
53
- | remove_first: 'https://'
54
- | remove_first: 'http://'
55
- | replace: '+', '%2B'
56
- | url_decode
57
- -}}
58
- {%- else -%}
59
- {{- page.title | default: site.title -}}
60
- {%- endif -%}
61
- </title>
11
+ {%- endif -%}
62
12
 
63
- {%- if canonical %}
64
- <link rel="canonical" href="{{- canonical -}}">
13
+ {%- if title %}
14
+ <title>{{- title -}}</title>
65
15
  {%- endif -%}
66
16
 
67
- {%- if license %}
68
- <link rel="license" href="{{- license -}}">
17
+ {%- if canonical_url %}
18
+ <link rel="canonical" href="{{- canonical_url -}}">
69
19
  {%- endif -%}
70
20
 
71
- {%- if stylesheets %}
21
+ {%- if license_url %}
22
+ <link rel="license" href="{{- license_url -}}">
23
+ {%- endif -%}
24
+
25
+ {%- if stylesheets.size > 0 %}
72
26
  <style>
73
- {%- for stylesheet in stylesheets %}{% include {{ stylesheet }} %}{% endfor %} </style>
74
- {%- endif %}
27
+ {%- for stylesheet in stylesheets -%}
28
+ {%- include {{ stylesheet }} -%}
29
+ {%- endfor %} </style>
30
+ {%- endif -%}
@@ -1,11 +1,8 @@
1
- ---
2
- layout: base
3
- ---
4
-
5
- <ul>
1
+ {%- if site.pages.size > 0 %} <ul>
6
2
  {%- for page in site.pages %}
7
3
  <li>
8
4
  <a href="{{- page.url -}}">{{- page.slug -}}</a>
9
5
  </li>
10
6
  {%- endfor %}
11
7
  </ul>
8
+ {%- endif %}
@@ -1,11 +1,8 @@
1
- ---
2
- layout: base
3
- ---
4
-
5
- <ul>
1
+ {%- if site.posts.size > 0 %} <ul>
6
2
  {%- for post in site.posts %}
7
3
  <li>
8
4
  <a href="{{- post.url | remove_first: page.url -}}">{{- post.slug -}}</a>
9
5
  </li>
10
6
  {%- endfor %}
11
7
  </ul>
8
+ {%- endif %}
data/_includes/post.css CHANGED
@@ -6,5 +6,4 @@
6
6
  white-space: -pre-wrap;
7
7
  white-space: -o-pre-wrap;
8
8
  white-space: pre-wrap;
9
- white-space: break-spaces;
10
9
  }
@@ -0,0 +1,82 @@
1
+ {%- comment -%}
2
+ # Whether the page is a post.
3
+ {%- endcomment -%}
4
+ {%- if page.layout == "post" -%}
5
+ {%- assign is_post = true -%}
6
+ {%- endif -%}
7
+
8
+ {%- assign default_lang = "en" -%}
9
+ {%- assign default_charset = "utf-8" -%}
10
+ {%- assign default_color_scheme = "light dark" -%}
11
+ {%- assign default_viewport = "width=device-width, initial-scale=1" -%}
12
+ {%- assign default_title = "" -%}
13
+ {%- assign default_canonical_url = page.url | absolute_url -%}
14
+ {%- assign default_license_url = false -%}
15
+ {%- assign default_stylesheets = "" | split: ", " -%}
16
+
17
+ {%- comment -%}
18
+ # Lang.
19
+ {%- endcomment -%}
20
+ {%- assign lang = page.lang -%}
21
+ {%- if lang == nil -%}{%- assign lang = site.lang -%}
22
+ {%- if lang == nil -%}{%- assign lang = default_lang -%}{%- endif -%}{%- endif -%}
23
+
24
+ {%- comment -%}
25
+ # Charset.
26
+ {%- endcomment -%}
27
+ {%- assign charset = page.charset -%}
28
+ {%- if charset == nil -%}{%- assign charset = site.charset -%}
29
+ {%- if charset == nil -%}{%- assign charset = default_charset -%}{%- endif -%}{%- endif -%}
30
+
31
+ {%- comment -%}
32
+ # Color scheme.
33
+ {%- endcomment -%}
34
+ {%- assign color_scheme = page.color_scheme -%}
35
+ {%- if color_scheme == nil -%}{%- assign color_scheme = site.color_scheme -%}
36
+ {%- if color_scheme == nil -%}{%- assign color_scheme = default_color_scheme -%}{%- endif -%}{%- endif -%}
37
+
38
+ {%- comment -%}
39
+ # Viewport.
40
+ {%- endcomment -%}
41
+ {%- assign viewport = page.viewport -%}
42
+ {%- if viewport == nil -%}{%- assign viewport = site.viewport -%}
43
+ {%- if viewport == nil -%}{%- assign viewport = default_viewport -%}{%- endif -%}{%- endif -%}
44
+
45
+ {%- comment -%}
46
+ # Canonical url.
47
+ {%- endcomment -%}
48
+ {%- assign canonical_url = page.canonical_url -%}
49
+ {%- if canonical_url == nil -%}{%- assign canonical_url = site.canonical_url -%}
50
+ {%- if canonical_url == nil -%}{%- assign canonical_url = default_canonical_url -%}{%- endif -%}{%- endif -%}
51
+
52
+ {%- comment -%}
53
+ # Title.
54
+ {%- endcomment -%}
55
+ {%- if is_post -%}
56
+ {%-
57
+ assign title =
58
+ canonical_url
59
+ | remove_first: "https://www."
60
+ | remove_first: "http://www."
61
+ | remove_first: "https://"
62
+ | remove_first: "http://"
63
+ -%}
64
+ {%- else -%}
65
+ {%- assign title = page.title -%}
66
+ {%- if title == nil -%}{%- assign title = site.title -%}
67
+ {%- if title == nil -%}{%- assign title = default_title -%}{%- endif -%}{%- endif -%}
68
+ {%- endif -%}
69
+
70
+ {%- comment -%}
71
+ # License url.
72
+ {%- endcomment -%}
73
+ {%- assign license_url = page.license_url -%}
74
+ {%- if license_url == nil -%}{%- assign license_url = site.license_url -%}
75
+ {%- if license_url == nil -%}{%- assign license_url = default_license_url -%}{%- endif -%}{%- endif -%}
76
+
77
+ {%- comment -%}
78
+ # Stylesheets.
79
+ {%- endcomment -%}
80
+ {%- assign stylesheets = page.stylesheets -%}
81
+ {%- if stylesheets == nil -%}{%- assign stylesheets = site.stylesheets -%}
82
+ {%- if stylesheets == nil -%}{%- assign stylesheets = default_stylesheets -%}{%- endif -%}{%- endif -%}
@@ -0,0 +1 @@
1
+ default.html
@@ -0,0 +1,9 @@
1
+ {%- include variables.html -%}
2
+
3
+ <!DOCTYPE html>
4
+ <html {%- if lang %} lang="{{- lang -}}"{%- endif -%}>
5
+ <head>{%- include head.html %}
6
+ </head>
7
+ <body>
8
+ {{ content }} </body>
9
+ </html>
@@ -0,0 +1 @@
1
+ default.html
@@ -0,0 +1 @@
1
+ default.html
data/_layouts/post.html CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- layout: base
2
+ layout: default
3
3
  ---
4
4
 
5
- <pre>{{ content | xml_escape | replace: "&apos;", "&#39;" }}</pre>
5
+ <pre>{{- content | xml_escape | replace: "&apos;", "&#39;" -}}</pre>
metadata CHANGED
@@ -1,73 +1,62 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-plain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yuuki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-24 00:00:00.000000000 Z
11
+ date: 2024-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: jekyll
14
+ name: github-pages
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.9'
19
+ version: '228'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.9'
26
+ version: '228'
27
27
  - !ruby/object:Gem::Dependency
28
- name: bundler
28
+ name: webrick
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.16'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.16'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '12.0'
48
- type: :development
33
+ version: '1.7'
34
+ type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: '12.0'
40
+ version: '1.7'
55
41
  description:
56
42
  email:
57
- - yuuki@yuukikonno.com
58
43
  executables: []
59
44
  extensions: []
60
45
  extra_rdoc_files: []
61
46
  files:
62
47
  - LICENSE
63
48
  - README.md
49
+ - _includes/directory-listing.html
64
50
  - _includes/head.html
51
+ - _includes/page-listing.html
52
+ - _includes/post-listing.html
65
53
  - _includes/post.css
54
+ - _includes/variables.html
66
55
  - _layouts/base.html
67
- - _layouts/page-list.html
68
- - _layouts/post-list.html
56
+ - _layouts/default.html
57
+ - _layouts/home.html
58
+ - _layouts/page.html
69
59
  - _layouts/post.html
70
- - _layouts/static-page-list.html
71
60
  homepage: https://github.com/jekyll-theme-plain/jekyll-theme-plain
72
61
  licenses:
73
62
  - CC0-1.0
@@ -90,5 +79,5 @@ requirements: []
90
79
  rubygems_version: 3.5.5
91
80
  signing_key:
92
81
  specification_version: 4
93
- summary: A plain text-like Jekyll theme for GitHub Pages
82
+ summary: Plain text-like Jekyll theme for GitHub Pages
94
83
  test_files: []
data/_layouts/base.html DELETED
@@ -1,10 +0,0 @@
1
- {%- assign lang = page.lang -%}
2
- {%- if lang == nil -%}{%- assign lang = site.lang -%}
3
- {%- if lang == nil -%}{%- assign lang = 'en' -%}{%- endif -%}{%- endif -%}
4
-
5
- <!DOCTYPE html>
6
- <html {%- if lang %} lang="{{- lang -}}"{%- endif -%}>
7
- <head>{% include head.html %} </head>
8
- <body>
9
- {{ content }} </body>
10
- </html>
@@ -1,13 +0,0 @@
1
- ---
2
- layout: base
3
- ---
4
-
5
- <ul>
6
- {%- assign files = site.static_files | where: "extname", ".html" -%}
7
- {%- for file in files -%}
8
- {%- assign path = file.path | remove_first: page.url | remove_first: "/index.html" %}
9
- <li>
10
- <a href="{{- path | append: "/" -}}">{{- path -}}</a>
11
- </li>
12
- {%- endfor %}
13
- </ul>