Skip to content

Commit

Permalink
Replace middleman-search with lunr with Algolia DocSearch
Browse files Browse the repository at this point in the history
Signed-off-by: Takuya Noguchi <[email protected]>
  • Loading branch information
tnir committed Jul 19, 2022
1 parent e1c6d52 commit 846f7c4
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 353 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ gem 'middleman', '~> 4.4'
gem 'middleman-syntax'
gem 'middleman-blog'
gem 'puma', '~> 5.6'
gem 'middleman-search', github: 'deivid-rodriguez/middleman-search', branch: 'workarea-commerce-master'
gem 'rake'
gem 'ronn'
gem 'kramdown'
Expand Down
16 changes: 0 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
GIT
remote: https://github.com/deivid-rodriguez/middleman-search.git
revision: 50465e1c1580e282a45247b77036da3c2719870d
branch: workarea-commerce-master
specs:
middleman-search (0.10.0)
middleman-core (>= 3.2)
mini_racer (~> 0.5)
nokogiri (~> 1.6)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -52,9 +42,6 @@ GEM
json (2.6.2)
kramdown (2.4.0)
rexml
libv8-node (16.10.0.0)
libv8-node (16.10.0.0-arm64-darwin)
libv8-node (16.10.0.0-x86_64-linux)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
Expand Down Expand Up @@ -101,8 +88,6 @@ GEM
middleman-core (>= 3.2)
rouge (~> 3.2)
mini_portile2 (2.8.0)
mini_racer (0.5.0)
libv8-node (~> 16.10.0.0)
minitest (5.14.4)
mustache (1.0.5)
nio4r (2.5.8)
Expand Down Expand Up @@ -193,7 +178,6 @@ DEPENDENCIES
kramdown
middleman (~> 4.4)
middleman-blog
middleman-search!
middleman-syntax
nokogiri (~> 1.13)
octokit (~> 5.1)
Expand Down
4 changes: 2 additions & 2 deletions assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import './search'
import './search_arrows'
import AnchorJS from 'anchor-js';

import "./docsearch";

const anchors = new AnchorJS();

anchors.options = {
Expand Down
6 changes: 6 additions & 0 deletions assets/javascripts/docsearch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
docsearch({
appId: "3JA5LRH987",
apiKey: "120ba00028e4e207674891463ae3fb17",
indexName: "bundler",
container: "#docsearch",
});
146 changes: 0 additions & 146 deletions assets/javascripts/search.js

This file was deleted.

93 changes: 0 additions & 93 deletions assets/javascripts/search_arrows.js

This file was deleted.

15 changes: 15 additions & 0 deletions assets/stylesheets/_docsearch.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.DocSearch-Hits mark {
mark {
padding: 0;
}
}

.DocSearch-Logo a:hover {
text-decoration: none;
}

:root {
--docsearch-logo-color: var(--bs-gray-300);
--docsearch-primary-color: var(--bs-primary);
--docsearch-searchbox-background: #DBEAF3; // .bg-light-blue and .sidebar-nav .active
}
75 changes: 0 additions & 75 deletions assets/stylesheets/_search.scss

This file was deleted.

Loading

0 comments on commit 846f7c4

Please sign in to comment.