Last active
May 2, 2023 13:16
-
-
Save leabs/7029f02a8b002c5210bc90b177c6448b to your computer and use it in GitHub Desktop.
Search all Jekyll collections using jekyll-simple-search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: none | |
--- | |
{% assign allCollections = site.collections %} | |
{% for collection in allCollections %} | |
{% assign allPosts = allPosts | concat: collection.docs %} | |
{% endfor %} | |
[ | |
{% for post in allPosts %} | |
{ | |
"title" : "{{ post.title | escape }}", | |
"url" : "{{ site.baseurl }}{{ post.url | escape }}" | |
} {% unless forloop.last %},{% endunless %} | |
{% endfor %} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment