jekyll-turbolinks 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/jekyll-turbolinks.rb +3 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51a8c6b046dce3f086a0a220563e7548221bc6d36d1d6e15daac2884f285a1af
|
4
|
+
data.tar.gz: 68e2724aa8aace5122ccab5007b8bb503f92f8159d89708f13c3247424c4a89b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6e72011333f6c39902f82ae90b6a473fb19723837969265c163e518d1d1a542f4925a405061d8bfba7871d337865938d213576cb2b092f641368b1242fbcfde
|
7
|
+
data.tar.gz: bedaba3149bae647263533d89e9999b09319be6f7660ca295c28568e79f467d7f03df9e6f603faf91372477f22f0cad7d89cf38c988886b0b87a5eaf447d1ded
|
data/README.md
CHANGED
@@ -45,6 +45,13 @@ turbolinks: false
|
|
45
45
|
|
46
46
|
That's it! Turbolinks will be loaded and enabled by default.
|
47
47
|
|
48
|
+
Keep in mind that if you're not using [relative urls](https://0xacab.org/sutty/jekyll/jekyll-relative-urls) you must set the `turbolinks` path to an absolute path, like so:
|
49
|
+
|
50
|
+
```yaml
|
51
|
+
turbolinks:
|
52
|
+
url: /turbolinks.js
|
53
|
+
```
|
54
|
+
|
48
55
|
### Manual
|
49
56
|
|
50
57
|
To add it manually call the `turbolinks` Liquid tag to insert the actual
|
data/lib/jekyll-turbolinks.rb
CHANGED
@@ -51,12 +51,12 @@ Jekyll::Hooks.register :site, :post_render do |site|
|
|
51
51
|
# Process each file and add the script
|
52
52
|
site.each_site_file do |file|
|
53
53
|
next unless file.respond_to? :output
|
54
|
-
next unless file.data.fetch('turbolinks', true)
|
55
54
|
next if file.output.nil?
|
55
|
+
next unless file.data.fetch('turbolinks', true)
|
56
56
|
|
57
57
|
file.output
|
58
|
-
.
|
59
|
-
|
58
|
+
.sub! %r{</head>},
|
59
|
+
"<script defer src=\"#{config['url']}\"></script></head>"
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-turbolinks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -62,7 +62,7 @@ metadata:
|
|
62
62
|
source_code_uri: https://0xacab.org/sutty/jekyll/jekyll-turbolinks
|
63
63
|
changelog_uri: https://0xacab.org/sutty/jekyll/jekyll-turbolinks/-/blob/master/CHANGELOG.md
|
64
64
|
documentation_uri: https://rubydoc.info/gems/jekyll-turbolinks
|
65
|
-
post_install_message:
|
65
|
+
post_install_message:
|
66
66
|
rdoc_options:
|
67
67
|
- "--title"
|
68
68
|
- jekyll-turbolinks - A Jekyll plugin to use turbolinks
|
@@ -75,17 +75,17 @@ require_paths:
|
|
75
75
|
- lib
|
76
76
|
required_ruby_version: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- - "
|
78
|
+
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
80
|
+
version: 2.7.0
|
81
81
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
|
-
rubygems_version: 3.
|
88
|
-
signing_key:
|
87
|
+
rubygems_version: 3.3.26
|
88
|
+
signing_key:
|
89
89
|
specification_version: 4
|
90
90
|
summary: A Jekyll plugin to use turbolinks
|
91
91
|
test_files: []
|