Basic search implementation

This commit is contained in:
johndmulhausen
2016-02-23 23:21:23 -08:00
parent 716237d0c7
commit db3acc9464
4 changed files with 26 additions and 5 deletions
+2 -2
View File
@@ -6,14 +6,14 @@ toc:
- title: Quickstarts - title: Quickstarts
section: section:
- title: What is Kubernetes?
path: /v1.1/docs/whatisk8s/
- title: TODO - 5-minute Quickstart - title: TODO - 5-minute Quickstart
path: /v1.1/docs/hellonode/ path: /v1.1/docs/hellonode/
- title: Kubernetes 101 - title: Kubernetes 101
path: /v1.1/docs/user-guide/walkthrough/ path: /v1.1/docs/user-guide/walkthrough/
- title: Kubernetes 201 - title: Kubernetes 201
path: /v1.1/docs/user-guide/walkthrough/k8s201/ path: /v1.1/docs/user-guide/walkthrough/k8s201/
- title: Running a MEAN stack on Google Cloud Platform with Kubernetes
path: /v1.1/docs/getting-started-guides/meanstack/
- title: Running Kubernetes - title: Running Kubernetes
section: section:
+2
View File
@@ -30,6 +30,8 @@ toc:
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/openshift-origin/ path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/openshift-origin/
- title: Ceph - title: Ceph
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/rbd/ path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/rbd/
- title: MEAN stack on Google Cloud Platform
path: /v1.1/docs/getting-started-guides/meanstack/
- title: Persistent Volume Samples - title: Persistent Volume Samples
section: section:
+3 -3
View File
@@ -22,16 +22,16 @@ layout: headerfooter
<a href="/v1.1">Version 1.1</a> <a href="/v1.1">Version 1.1</a>
<a href="/v1.0">Version 1.0</a> <a href="/v1.0">Version 1.0</a>
</div> </div>
<input type="text" id="search" placeholder="Search the docs"> <input type="text" id="search" placeholder="Search" onkeydown="if (event.keyCode==13) window.location.replace('/search/?q=' + this.value)">
</div> </div>
</section> </section>
<section id="encyclopedia"> <section id="encyclopedia">{% if page.hideTOC != true %}
<div id="docsToc"> <div id="docsToc">
<div class="pi-accordion"> <div class="pi-accordion">
{% assign tree = site.data[page.versionfilesafe][foundTOC].toc %}{% include tree.html %} {% assign tree = site.data[page.versionfilesafe][foundTOC].toc %}{% include tree.html %}
</div> <!-- /pi-accordion --> </div> <!-- /pi-accordion -->
</div> <!-- /docsToc --> </div> <!-- /docsToc -->{% endif %}
<div id="docsContent">{% if page.showedit == true %}<a href="/{{ page.version }}/editdocs#{{ page.path }}" id="editPageButton">Edit This Page</a>{% endif %} <div id="docsContent">{% if page.showedit == true %}<a href="/{{ page.version }}/editdocs#{{ page.path }}" id="editPageButton">Edit This Page</a>{% endif %}
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>
{{ content }} {{ content }}
+19
View File
@@ -0,0 +1,19 @@
---
layout: docwithnav
title: Search Results
hideTOC: true
---
<script>
(function() {
var cx = '013467772795878830775:lgtavaxylpe';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:searchresults-only linktarget="_parent"></gcse:searchresults-only>