瀏覽代碼

Merge pull request #2114 from metalivedev/2113-searchbump

Fix #2113 improve doc search results
Andy Rothfusz 11 年之前
父節點
當前提交
c1bb33ea4d
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      docs/theme/docker/layout.html

+ 6 - 0
docs/theme/docker/layout.html

@@ -6,6 +6,9 @@
     <title>{{ meta['title'] if meta and meta['title'] else title }} - Docker Documentation</title>
     <meta name="description" content="{{ meta['description'] if meta }}" />
     <meta name="keywords" content="{{ meta['keywords'] if meta }}" />
+    <!-- Swiftype tags: https://swiftype.com/documentation/meta_tags -->
+    <meta property='st:popularity' content='4' />
+    <meta property='st:type' content='docker_doc' />
 
     {%- set url_root = pathto('', 1) %}
     {%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
@@ -168,6 +171,9 @@
   Swiftype.resultContainingElement = '#st-results-container';
   Swiftype.attachElement = '#st-search-input';
   Swiftype.renderStyle = "overlay";
+  // from https://swiftype.com/questions/how-can-i-make-more-popular-content-rank-higher 
+  // Use "page" for now -- they don't subgroup by document type yet.
+  Swiftype.searchFunctionalBoosts = {"page": {"popularity": "linear"}};
 
   var script = document.createElement('script');
   script.type = 'text/javascript';