From a9ab8b7bf7a1f9b80e1d17bc0a9d00f5fe80f73f Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Wed, 21 Jan 2015 16:24:43 -0500 Subject: [PATCH] Remove search overlay - Fixes #88 - Replace overlay with dedicated search page (see /search/index.md) - Replace simpleJekyllSearch.js - Include pages in search.json index --- 404.md | 1 + README.md | 2 +- _config.yml | 2 +- _data/navigation.yml | 5 +- _includes/navigation.html | 3 - _includes/scripts.html | 38 ----- _includes/site-search.html | 7 - _sass/_forms.scss | 23 ++- _sass/_layout.scss | 6 + _sass/_simple-search.scss | 78 --------- articles/index.md | 1 + assets/css/main.scss | 1 - assets/js/plugins/search.js | 200 ++++++++++++++++++++++++ assets/js/plugins/simpleJekyllSearch.js | 108 ------------- assets/js/scripts.min.js | 4 +- blog/index.md | 1 + index.html | 1 + search.json | 30 ++-- search/index.md | 32 ++++ tags/index.md | 1 + theme-setup/index.md | 9 +- 21 files changed, 296 insertions(+), 257 deletions(-) delete mode 100644 _includes/site-search.html delete mode 100644 _sass/_simple-search.scss create mode 100644 assets/js/plugins/search.js delete mode 100644 assets/js/plugins/simpleJekyllSearch.js create mode 100644 search/index.md diff --git a/404.md b/404.md index 8c84a38..f93b459 100644 --- a/404.md +++ b/404.md @@ -3,6 +3,7 @@ layout: page title: "Page Not Found" description: "Page not found. Your pixels are in another canvas." sitemap: false +search_omit: true --- Sorry, but the page you were trying to view does not exist --- perhaps you can try searching for it below. diff --git a/README.md b/README.md index ee01de5..760a70b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Looking for a simple, responsive, theme for your Jekyll powered blog? Well look * Minimal embellishments and subtle animations. * Optional large feature images for posts and pages. * [Custom 404 page](http://mmistakes.github.io/so-simple-theme/404.html) to get you started. -* [Simple site search](https://github.com/christian-fei/Simple-Jekyll-Search) +* Basic [search capabilities](https://github.com/mathaywarduk/jekyll-search) * Support for Disqus Comments ![screenshot of So Simple Theme](http://mmistakes.github.io/so-simple-theme/images/so-simple-theme-preview.jpg) diff --git a/_config.yml b/_config.yml index 5b5b603..23a46ac 100644 --- a/_config.yml +++ b/_config.yml @@ -5,7 +5,7 @@ locale: en_US description: Describe your website here. logo: site-logo.png search: true -url: +url: http://localhost:4000 # Jekyll configuration diff --git a/_data/navigation.yml b/_data/navigation.yml index 0fa1e4d..a1973eb 100644 --- a/_data/navigation.yml +++ b/_data/navigation.yml @@ -13,4 +13,7 @@ url: /theme-setup/ - title: Made Mistakes - url: http://mademistakes.com \ No newline at end of file + url: http://mademistakes.com + +- title: Search + url: /search/ \ No newline at end of file diff --git a/_includes/navigation.html b/_includes/navigation.html index 8021bb5..852e106 100644 --- a/_includes/navigation.html +++ b/_includes/navigation.html @@ -9,15 +9,12 @@ {% endif %}
  • {{ link.title }}
  • {% endfor %} - {% if site.search %}
  • Search
  • {% endif %} {% include browser-upgrade.html %} -{% if site.search %}{% include site-search.html %}{% endif %} - {% if page.image.feature %}
    {% if site.logo != null %}
    diff --git a/_includes/scripts.html b/_includes/scripts.html index d42a0e6..17ef91e 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -1,45 +1,7 @@ -{% if site.search %} - - -{% endif %} {% if site.owner.google.analytics %} \ No newline at end of file diff --git a/tags/index.md b/tags/index.md index 9a3c93f..10ad08b 100644 --- a/tags/index.md +++ b/tags/index.md @@ -2,6 +2,7 @@ layout: page title: Tag Index excerpt: "An archive of posts sorted by tag." +search_omit: true --- {% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} diff --git a/theme-setup/index.md b/theme-setup/index.md index 4f27717..5062a10 100644 --- a/theme-setup/index.md +++ b/theme-setup/index.md @@ -323,14 +323,11 @@ Here's an example of a tweet with Twitter Cards enabled. --- -## Simple Search +## Jekyll search -Adding `search: true` to your `_config.yml` enables search using Christian Fei's [Simple Jekyll jQuery plugin](https://github.com/christian-fei/Simple-Jekyll-Search). Clicking the search link in the navigation bar will overlay a Search box that searches on post titles using an auto generated JSON file. +This is a very basic attempt at [indexing a Jekyll site](https://github.com/mathaywarduk/jekyll-search) and returning search results with JSON --- Google this is not. -
    - search screenshot -
    Search your site by post title
    -
    +To exclude posts/pages from search results add `search_omit: true` to their YAML Front Matter. ---