Skip to content

mwgg/Pico-Search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Pico Search Plugin

Provides very basic search functionality, loosely ranking results based on number of matches per page. To be improved for better search results.

Usage

  1. Create a page with any name you like, for example "search". In the meta section include Purpose: search_results.
  2. In your template provide a basic HTML form with an input field named q, method GET, and action URL pointing to the page you have created.
  3. Add the following code to your template near the {{ content }} tag:
{% if meta.purpose == "search_results" %}
        <p class="meta">{{ search_num_results }} page(s) found for "{{ search_term }}"</p>
        {% for page in search_results %}
                <h4><a href="{{ page.url }}">{{ page.title }}</a></h4>
                {% if page.date %}<p class="meta">{{ page.date_formatted }} by {{ page.author }}</p>{% endif %}
                <p class="excerpt">{{ page.excerpt }}</p>
        {% endfor %}
{% endif %}

About

Pico CMS plugin providing basic search functionality.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages