beautiful-jekyll icon indicating copy to clipboard operation
beautiful-jekyll copied to clipboard

[performance] Search is creating larger pagesizes because the index is built in

Open monksy opened this issue 5 months ago • 0 comments

Based on the doc: https://github.com/christian-fei/Simple-Jekyll-Search

You can generate the search text in a seperate file. I think this would help build times and reduce page sizes.

https://github.com/daattali/beautiful-jekyll/blob/e5ababbfb57c0dbf5dae997c60271b4ccee6fed8/_includes/search.html#L12

There would be a request for the end user to create a generated page:

---
layout: none
---
[
  {% for post in site.posts %}
    {
      "title"    : "{{ post.title | escape }}",
      "category" : "{{ post.category }}",
      "tags"     : "{{ post.tags | join: ', ' }}",
      "url"      : "{{ site.baseurl }}{{ post.url }}",
      "date"     : "{{ post.date }}"
    } {% unless forloop.last %},{% endunless %}
  {% endfor %}
]

monksy avatar Jan 31 '24 05:01 monksy