Browse Source

Add algolia search

zhixin 7 years ago
parent
commit
fb3d9dedab
6 changed files with 13 additions and 4 deletions
  1. 1 0
      .travis.yml
  2. 4 0
      Gemfile
  3. 4 0
      _config.yml
  4. 1 1
      deploy.sh
  5. 1 1
      site/_includes/docs-sidebar.html
  6. 2 2
      site/assets/js/docs.min.js

+ 1 - 0
.travis.yml

@@ -7,6 +7,7 @@ script: bash ./deploy.sh
 branches:
   only:
   - master
+  - develop
 
 env:
   global:

+ 4 - 0
Gemfile

@@ -7,3 +7,7 @@ group :development, :test do
   gem 'jekyll-toc', '~> 0.9.1'
   gem 'wdm', '~> 0.1.1', :install_if => Gem.win_platform?
 end
+
+group :jekyll_plugins do
+  gem 'jekyll-algolia'
+end

+ 4 - 0
_config.yml

@@ -22,6 +22,10 @@ plugins:
   - jekyll-sitemap
   - jekyll-toc
 
+algolia:
+  application_id: FXDJ517Z8G
+  index_name:     bootstrap-table
+
 # Custom variables
 current_version:  1.13.1
 title:            "Bootstrap Table"

+ 1 - 1
deploy.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 set -e # Exit with nonzero exit code if anything fails
 
-SOURCE_BRANCH="master"
+SOURCE_BRANCH="develop"
 TARGET_BRANCH="gh-pages"
 
 function doCompile {

+ 1 - 1
site/_includes/docs-sidebar.html

@@ -1,5 +1,5 @@
 <form class="bd-search d-flex align-items-center">
-  <input type="search" class="form-control" style="display: none !important"
+  <input type="search" class="form-control"
     id="search-input" placeholder="Search..."
     aria-label="Search for..." autocomplete="off">
   <button class="btn btn-link bd-search-docs-toggle d-md-none p-0 ml-3"

File diff suppressed because it is too large
+ 2 - 2
site/assets/js/docs.min.js