Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Help implementing search function

Started by Shane 6 years ago · 0 replies · 497 views
6 years ago

I'm using Grav for a website that it works very well. Except I have not been successful in using the search function at all. Oddly, I'm using Grav to access data stored in a yaml file in the data folder. So ALL my pages look like this:

TWIG
{% for item in page.header.imports %}
  {% if item.Chapter == 5 %}
  Heb {{ item.Chapter }}:{{ item.Verse }}  {{ item.Context }}</br>
  {% endif %}
 {% endfor %}

After it pulls the data from the yaml file, it is actually an entire chapter from the Bible. This makes it very fast to roll out the site, but the bad side affect is NO SEARCH capabilities. If you know how to make search, or even caching work after the page is rendered, that would be wonderful. I would appreciate any pointers.

You can view the page at: www.biblia.reinavaleragomez.com

Suggested topics

Topic Participants Replies Views Activity
Support · by webmasterodp, 1 week ago
4 160 7 days ago
Support · by nwhitfield, 1 week ago
2 141 1 week ago
Support · by stell, 3 weeks ago
5 372 2 weeks ago
Support · by gravinator, 1 month ago
5 565 2 weeks ago
Support · by Gravver, 3 weeks ago
6 350 3 weeks ago