bridgetown-paginate 0.21.0.beta2 → 0.21.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73658b671ce99dcb98aaac7ed5cae7b2d00be40cba39cdfb5c2736a802028c05
|
4
|
+
data.tar.gz: 49a274756b395c33b7645420de58d1bf9ae2192021937b8b47253d295d231d09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cc12d7f28da3ebe4fd35564d747e5d0c23ab85e5694bfd62e813448207824cf37de3a9c2180ea5430975e3df7ff2de94b65b9d36246fb070ae63c82fa5ef1db
|
7
|
+
data.tar.gz: 83e2e18c1b007f730fc8e8e984ed9b831f84866a413672c6c2986be4cd34af754acb32d2cbda78188aee29ceafd42a283f14c7c6cc5b82cf763b167b6dd36378
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Handles
|
3
|
+
# Handles Generated Pages
|
4
4
|
Bridgetown::Hooks.register :pages, :post_init, reloadable: false do |page|
|
5
5
|
if page.class != Bridgetown::Paginate::PaginationPage &&
|
6
6
|
page.site.config.dig("pagination", "enabled")
|
@@ -21,3 +21,8 @@ Bridgetown::Hooks.register :resources, :post_read, reloadable: false do |page|
|
|
21
21
|
Bridgetown::Paginate::PaginationGenerator.add_matching_template(page)
|
22
22
|
end
|
23
23
|
end
|
24
|
+
|
25
|
+
# Ensure sites clear out templates before rebuild
|
26
|
+
Bridgetown::Hooks.register :site, :after_reset, reloadable: false do |_site|
|
27
|
+
Bridgetown::Paginate::PaginationGenerator.matching_templates.clear
|
28
|
+
end
|
@@ -13,14 +13,13 @@ module Bridgetown
|
|
13
13
|
# This generator should be passive with regard to its execution
|
14
14
|
priority :lowest
|
15
15
|
|
16
|
-
@
|
17
|
-
|
18
|
-
|
19
|
-
@matching_templates << template
|
16
|
+
# @return [Set<Bridgetown::Page, Bridgetown::Resource::Base>]
|
17
|
+
def self.matching_templates
|
18
|
+
@matching_templates ||= Set.new
|
20
19
|
end
|
21
20
|
|
22
|
-
|
23
|
-
|
21
|
+
def self.add_matching_template(template)
|
22
|
+
matching_templates << template
|
24
23
|
end
|
25
24
|
|
26
25
|
# Generate paginated pages if necessary (Default entry point)
|
@@ -47,7 +46,7 @@ module Bridgetown
|
|
47
46
|
# Get all matching pages in the site found by the init hooks, and ensure they're
|
48
47
|
# still in the site.pages array
|
49
48
|
templates = self.class.matching_templates.select do |page|
|
50
|
-
site.
|
49
|
+
site.generated_pages.include?(page) || site.resources.include?(page)
|
51
50
|
end
|
52
51
|
|
53
52
|
# Get the default title of the site (used as backup when there is no
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-paginate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.
|
4
|
+
version: 0.21.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bridgetown-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.21.
|
19
|
+
version: 0.21.1
|
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: 0.21.
|
26
|
+
version: 0.21.1
|
27
27
|
description:
|
28
28
|
email: maintainers@bridgetownrb.com
|
29
29
|
executables: []
|
@@ -57,9 +57,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
57
57
|
version: '0'
|
58
58
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - "
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
62
|
+
version: '0'
|
63
63
|
requirements: []
|
64
64
|
rubygems_version: 3.1.4
|
65
65
|
signing_key:
|