jekyll-meilisearch 0.4.2 → 0.4.4
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/lib/jekyll-meilisearch/generator.rb +8 -1
- data/lib/jekyll-meilisearch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4da47ba1df678c00a9a0fbc425cec3804a405c71d95017b41eb9d1741b08c6e5
|
4
|
+
data.tar.gz: a31bc7a11515a039a6c573956ab9c0ec35fa8507082af7237a1a86478b599074
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19c756561d91385a94d0a7d80cc1e2a9be229e348d87ee07cfbcb4c513d72d2b27435cc223ec29ab26fff4d3614c650658bf530af43d310e7418818013f6925f
|
7
|
+
data.tar.gz: fc4ec410ec67b5209988909bf2319c131b0c10f492c41de6bc9ee8604ed50f5e907eab89b331d78a1996dcb7720c30a3358a39792eb6346cfe8838fc0815c499
|
@@ -23,7 +23,11 @@ module JekyllMeilisearch
|
|
23
23
|
|
24
24
|
# Returns the plugin's config or an empty hash if not set
|
25
25
|
def config
|
26
|
-
@config ||=
|
26
|
+
@config ||= begin
|
27
|
+
meilisearch_config = @site.config["meilisearch"] || {}
|
28
|
+
meilisearch_config["url"] = meilisearch_config["url"].chomp("/") if meilisearch_config["url"]
|
29
|
+
meilisearch_config
|
30
|
+
end
|
27
31
|
end
|
28
32
|
|
29
33
|
def validate_config
|
@@ -57,6 +61,9 @@ module JekyllMeilisearch
|
|
57
61
|
id_format = collection_settings["id_format"] || :default
|
58
62
|
|
59
63
|
collection_docs = collection.docs.map do |doc|
|
64
|
+
# Skip if no front matter
|
65
|
+
next unless doc.data.any?
|
66
|
+
|
60
67
|
sanitized_id = generate_id(doc, collection_name, id_format)
|
61
68
|
doc_data = {
|
62
69
|
"id" => sanitized_id,
|