jekyll-strapi-mod 0.0.1 → 0.2.1
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 +4 -4
- data/README.md +4 -2
- data/lib/jekyll/strapi/collection.rb +1 -1
- data/lib/jekyll/strapi/site.rb +5 -1
- data/lib/jekyll/strapi/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 841fae0aa7bdab043f27d0be66214af545f8ed657bdecabcbca8d413c381c989
|
4
|
+
data.tar.gz: 33919270f0c1ec6c58b55cfca446bc48644089beb0b3f35f5932300ff88245d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f6a5ac7d4bc98357e64ffbce0bea9e2e28b808fab8b7267fa6abe92faaf0912e108827525ec853ed2d3f965d9091e088563be674f6ad5697e1bab5cfc02be93
|
7
|
+
data.tar.gz: d346859c123788de04feceb54c7e9349385130e95c63799796e7b6e2f909a819f45007dcba00c95c40b95389aad8bd08f9c56557a43f5edb134a1325456b9b07
|
data/README.md
CHANGED
@@ -21,12 +21,14 @@ plugins:
|
|
21
21
|
|
22
22
|
```yaml
|
23
23
|
strapi:
|
24
|
-
# Your API endpoint (optional, default to http://localhost:1337)
|
24
|
+
# Your API endpoint (optional, default to http://localhost:1337/api)
|
25
25
|
endpoint: http://localhost:1337/api
|
26
|
+
# Your REST API endpoint query string to specify a parameter for example http://localhost:1337/api/posts?populate=%2A (optional, default to populate=*)
|
27
|
+
parameter: populate=*
|
26
28
|
# Collections, key is used to access in the strapi.collections
|
27
29
|
# template variable
|
28
30
|
collections:
|
29
|
-
# Example for
|
31
|
+
# Example for an "articles" collection
|
30
32
|
articles:
|
31
33
|
# Collection name (optional)
|
32
34
|
type: article
|
@@ -19,7 +19,7 @@ module Jekyll
|
|
19
19
|
|
20
20
|
def each
|
21
21
|
# Initialize the HTTP query
|
22
|
-
path = "/#{@config['type'] || @collection_name}?_limit=10000"
|
22
|
+
path = "/#{@config['type'] || @collection_name}?_limit=10000#{@site.parameter}"
|
23
23
|
uri = URI("#{@site.endpoint}#{path}")
|
24
24
|
Jekyll.logger.info "Jekyll Strapi:", "Fetching entries from #{uri}"
|
25
25
|
# Get entries
|
data/lib/jekyll/strapi/site.rb
CHANGED
@@ -19,7 +19,11 @@ module Jekyll
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def endpoint
|
22
|
-
has_strapi? and @config['strapi']['endpoint'] or "http://localhost:1337"
|
22
|
+
has_strapi? and @config['strapi']['endpoint'] or "http://localhost:1337/api"
|
23
|
+
end
|
24
|
+
|
25
|
+
def parameter
|
26
|
+
has_strapi? and @config['strapi']['parameter'] or "populate=*"
|
23
27
|
end
|
24
28
|
|
25
29
|
def strapi_link_resolver(collection = nil, document = nil)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-strapi-mod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- marktawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -52,7 +52,8 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.1'
|
55
|
-
description: " A Jekyll plugin for retrieving content from a Strapi API
|
55
|
+
description: " A Jekyll plugin for retrieving content from a Strapi API. Works
|
56
|
+
with Strapi v4\n"
|
56
57
|
email:
|
57
58
|
- markmunyaka@gmail.com
|
58
59
|
executables: []
|