You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/08/30 22:43:59 UTC

[royale-docs] branch master updated: try docsearch

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new 7414911  try docsearch
7414911 is described below

commit 7414911e4aa015e1ac42b31406aba3fe606d8c2d
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sat Aug 31 00:43:51 2019 +0200

    try docsearch
---
 _config.yml             |  8 ++++----
 _layouts/docpage.html   | 14 ++++++++++++++
 _sass/royale-theme.sass | 12 ++++++++++++
 3 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/_config.yml b/_config.yml
index 99002b8..98c4667 100644
--- a/_config.yml
+++ b/_config.yml
@@ -19,7 +19,7 @@ highlighter: rouge
 sass:
   sass_dir: _sass
   style: compressed # possible values: nested expanded compact compressed
-algolia:
-  application_id: RDWVZJYELD
-  index_name: royale_docs
-  search_only_api_key: 890fa760fbe09782229acd811738def3
\ No newline at end of file
+#algolia:
+#  application_id: RDWVZJYELD
+#  index_name: royale_docs
+#  search_only_api_key: 890fa760fbe09782229acd811738def3
\ No newline at end of file
diff --git a/_layouts/docpage.html b/_layouts/docpage.html
index 79144e3..4e9e034 100644
--- a/_layouts/docpage.html
+++ b/_layouts/docpage.html
@@ -54,6 +54,7 @@ limitations under the License.
 
 <base href="{{ site.baseurl }}/" />
 <title>{{page.title}}</title>
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
 </head>
 
 <body class="page">
@@ -118,6 +119,10 @@ limitations under the License.
     <div class="toc" id="toc">
         
       
+
+        <div align="center">
+            <input class="docsearch-input"/>
+          </div>
   {% assign pagepathparts = page.path | split: "/" %}
   {% assign numparts = pagepathparts | size %}
   {% case numparts %)
@@ -411,6 +416,15 @@ limitations under the License.
   </div>
 
   
+  <!--{% include algolia.html %} -->
+  <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
+  <script type="text/javascript"> docsearch({
+  apiKey: 'd8ce6f56dbe882dae881d6cb769d8fc9',
+  indexName: 'apache_royale',
+  inputSelector: '.docsearch-input',
+  debug: true // Set debug to true if you want to inspect the dropdown
+  });
+  </script>
 
 </body>
 </html>
diff --git a/_sass/royale-theme.sass b/_sass/royale-theme.sass
index 05edf0c..a99df1b 100644
--- a/_sass/royale-theme.sass
+++ b/_sass/royale-theme.sass
@@ -441,3 +441,15 @@
 	display: inline-block
 	user-select: none
 
+.docsearch-input
+	background-color: rgb(245, 245, 250)
+	border-radius: 6px
+	border-style: solid
+	border-width: 0px
+	display: inline-block
+	font-size: 1em
+	height: 48px
+	line-height: 1em
+	outline-style: none
+	padding: 0px 24px
+	
\ No newline at end of file