bridgetown-prismic 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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +9 -1
- data/bridgetown-prismic.gemspec +1 -1
- data/lib/bridgetown-prismic/version.rb +1 -1
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cce35722e8584dd3378fa7ce61c3e6987749f15822b1f9f7bf22fced5f68a65d
|
4
|
+
data.tar.gz: 576383f25bcac3ea627846df09c03a21ce9c7e823d22b7d5b14ad18384d33f83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0088e0c7a0130f3b20f46ac7cdb182c22ac344a05d5af6ad126e760596be54e72bf50c48fb625e7d24a1ea3a11a311386113c280f7a8cb29d1aeecba5c1f7ac7'
|
7
|
+
data.tar.gz: 54cb371211505e21519e6bdcd205fd387fdd45d15276f2e49211fe50e11c9a3432327a713a70a9f0b85813c941515999ffcf2b975efbf0e661ab11cedcc74405
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
9
9
|
|
10
10
|
...
|
11
11
|
|
12
|
+
## 0.2.2
|
13
|
+
|
14
|
+
- Lock Async dependency to < 2.0 until fiber race condition is resolved
|
15
|
+
|
12
16
|
## 0.2.1
|
13
17
|
|
14
18
|
- Fix issue where link resolvers didn't provide the full document
|
data/README.md
CHANGED
@@ -129,6 +129,7 @@ def self.process_prismic_document(doc)
|
|
129
129
|
created_at doc.first_publication_date
|
130
130
|
date doc["blog_post.optional_publish_datetime"]&.value&.localtime || created_at
|
131
131
|
|
132
|
+
layout :post
|
132
133
|
title doc["blog_post.title"] .as_text
|
133
134
|
subtitle doc["blog_post.subtitle"] &.as_text
|
134
135
|
author doc["blog_post.author_name"] &.as_text
|
@@ -196,6 +197,7 @@ def self.process_prismic_document(doc)
|
|
196
197
|
type: doc.type,
|
197
198
|
created_at: doc.first_publication_date,
|
198
199
|
|
200
|
+
layout: :post,
|
199
201
|
title: doc["test_page.title"] .as_text,
|
200
202
|
|
201
203
|
content: doc["test_page.body"] &.as_html(with_links),
|
@@ -205,6 +207,12 @@ end
|
|
205
207
|
|
206
208
|
Just remember to put all your colons, commas, and parentheses in the right places! 😅
|
207
209
|
|
210
|
+
### Mind your defaults!
|
211
|
+
|
212
|
+
One gotcha to be aware of is that Prismic-sourced resources _will not pick up front matter defaults_ from any `_defaults.yml` files you may add to your `src` tree (for example in `src/_posts`). This is because `_defaults.yml` acts upon the file system directly, and resources originating from Prismic aren't part of the filesystem per se.
|
213
|
+
|
214
|
+
However, you can definitely use the YAML-based front matter defaults which you add to `bridgetown.config.yml` to set defaults for any collection. In addition, you can put any "default" data directly in your model definitions (such as the `layout: post` example above).
|
215
|
+
|
208
216
|
### Trying Out Your Models
|
209
217
|
|
210
218
|
The Bridgetown console is a good place to inspect your content. Just run `bin/bridgetown console` or `c` and then you can poke through your collections and see what's what.
|
@@ -236,7 +244,7 @@ Example for a Liquid layout:
|
|
236
244
|
or an ERB layout:
|
237
245
|
|
238
246
|
```erb
|
239
|
-
<% if site.
|
247
|
+
<% if site.config.prismic_preview_token %>
|
240
248
|
<p class="text-center" style="padding:7px; background:rgb(255, 230, 0); border-bottom:2px solid #333; margin:0; font-family:sans-serif; font-weight:bold; font-size:110%">
|
241
249
|
PREVIEW
|
242
250
|
</p>
|
data/bridgetown-prismic.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.add_dependency "bridgetown", ">= 1.0.0.alpha8", "< 2.0"
|
21
21
|
spec.add_dependency "prismic.io", ">= 1.8"
|
22
|
-
spec.add_dependency "async", ">= 1.30"
|
22
|
+
spec.add_dependency "async", ">= 1.30", "< 2.0"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler"
|
25
25
|
spec.add_development_dependency "rake", ">= 13.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-prismic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bridgetown
|
@@ -51,6 +51,9 @@ dependencies:
|
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '1.30'
|
54
|
+
- - "<"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '2.0'
|
54
57
|
type: :runtime
|
55
58
|
prerelease: false
|
56
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,6 +61,9 @@ dependencies:
|
|
58
61
|
- - ">="
|
59
62
|
- !ruby/object:Gem::Version
|
60
63
|
version: '1.30'
|
64
|
+
- - "<"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '2.0'
|
61
67
|
- !ruby/object:Gem::Dependency
|
62
68
|
name: bundler
|
63
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -141,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
147
|
- !ruby/object:Gem::Version
|
142
148
|
version: '0'
|
143
149
|
requirements: []
|
144
|
-
rubygems_version: 3.
|
150
|
+
rubygems_version: 3.3.3
|
145
151
|
signing_key:
|
146
152
|
specification_version: 4
|
147
153
|
summary: A Prismic CMS integration plugin for Bridgetown
|