jekyll-web-novel 0.2.1 → 0.2.2

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: 0e5b30286bc79f810c396c9cc8f55f9c3bd56be8c2195d5513ad8264bb592f6c
4
- data.tar.gz: 89447827c2847861b08a3ba44797621cffa434e3adaa2ac0650499aaf12b1087
3
+ metadata.gz: 01a90aba493fb6c9e1a54a59adf150447c5024b7e5deac759b4c04a581879894
4
+ data.tar.gz: a063bdf3620e148d027ad1ca78cb66d5a6dfaf7fef755e387ae5f1c691a2d74c
5
5
  SHA512:
6
- metadata.gz: 4ff5b24af5f8072a93ba667de2e891fcc31bafb84eaf72fd2c072fb4c1d08f2c596a69c9f0d9cf0f542adad507733c2983d645cdaf617ae1866ec63e0eef9dc9
7
- data.tar.gz: 401510a04f3a3090bbc88ef3cf140611dba02814dd5cc731e637cd48e97a4eebb337198e29eeed07101c57e44a609eb156ee610e0223f74780f0f5724ebd87eb
6
+ metadata.gz: 9142b4ea5cd79aba0016c67bd0e3cac950b4548a1e7eb6843c07a6f0beebca44e2640630f2995d29e2322fc5febbe1b99e3c3b0f34243452ee4283f7496a7872
7
+ data.tar.gz: 2552b29ac4d2fb78e82eabcdec0f3f0b7b7146fce5b6bc43a9ae868db33fa35eed4b5cc34f1f2362cc3a186eabfe2d6e44cc9276b107cb88701a8c9e548e74ba
@@ -8,9 +8,6 @@ _boilerplate:
8
8
 
9
9
  title: {{ boilerplate.title }}
10
10
  created: {{ boilerplate.time }}
11
- # permalink: /chapters/{{ boilerplate.random_url }}
12
- permalink: /chapters/{{ boilerplate.slug }}
13
- layout: chapter
14
11
  chapter: {{ boilerplate.cht }}
15
12
  volume: {{ boilerplate.vol }}
16
13
  ---
@@ -6,15 +6,14 @@ _boilerplate:
6
6
  slug: "{{ vol }}-{{ cht }}-{{ title }}"
7
7
  vol: '01'
8
8
 
9
- # http://localhost:4000/chapters/{{ boilerplate.random_url }}#reader
10
- # https://example.com/chapters/{{ boilerplate.random_url }}#reader
11
9
  title: {{ boilerplate.title }}
12
10
  created: {{ boilerplate.time }}
13
- permalink: /chapters/{{ boilerplate.random_url }}
14
- # permalink: /chapters/{{ boilerplate.slug }}
15
- layout: chapter
16
11
  chapter: {{ boilerplate.cht }}
17
12
  volume: {{ boilerplate.vol }}
13
+
14
+ share_link: https://example.com/chapters/{{ boilerplate.random_url }}#reader
15
+ preview_id: {{ boilerplate.random_url }}
16
+ permalink: /chapters/{{ boilerplate.random_url }}
18
17
  ---
19
18
 
20
19
  ### Chapter {{ boilerplate.cht }}
data/_config.yml CHANGED
@@ -42,9 +42,11 @@ collections:
42
42
  chapters:
43
43
  sort_by: chapter
44
44
  output: true
45
+ permalink: /:collection/:name
45
46
  previews:
46
47
  sort_by: chapter
47
48
  output: true
49
+ permalink: /chapters/:name
48
50
  volumes:
49
51
  sort_by: volume
50
52
  output: false
@@ -59,6 +61,7 @@ defaults:
59
61
  values:
60
62
  layout: "chapter"
61
63
  type: 'chapters'
64
+ published: true
62
65
  - scope:
63
66
  path: "_previews/*"
64
67
  values:
@@ -0,0 +1,20 @@
1
+
2
+ {% if page.published %}
3
+ {% if page.share_link != false %}
4
+
5
+
6
+ {% assign share = page.share_link %}
7
+ {% unless share %}
8
+ {% assign share = page.url | | prepend: site.url %}
9
+ {% endunless %}
10
+ {% assign share = share | append: '#reader' %}
11
+
12
+ <div class="container mt hbox">
13
+ <div class="div"></div>
14
+ <button copy="{{ share }}" title="{{ share }}">
15
+ Share Link
16
+ </button>
17
+ </div>
18
+
19
+ {% endif %}
20
+ {% endif %}
@@ -4,8 +4,9 @@ layout: root
4
4
 
5
5
  {% include chapter_header.html %}
6
6
 
7
- {% include reader.html %}
7
+ {% include share_link.html %}
8
8
 
9
+ {% include reader.html %}
9
10
 
10
11
  <div class="container">
11
12
  {% include chapter_nav.html %}
@@ -4,11 +4,6 @@ layout: root
4
4
 
5
5
  {% include header.html %}
6
6
 
7
- <div class="container mt">
8
-
9
- <button copy="{{ page.url | prepend: site.url }}">
10
- Copy URL
11
- </button>
12
- </div>
7
+ {% include share_link.html %}
13
8
 
14
9
  {% include reader.html %}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-web-novel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - opsaaaaa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-15 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webrick
@@ -116,6 +116,7 @@ files:
116
116
  - _includes/head.html
117
117
  - _includes/header.html
118
118
  - _includes/reader.html
119
+ - _includes/share_link.html
119
120
  - _includes/toc.html
120
121
  - _layouts/chapter.html
121
122
  - _layouts/default.html