Skip to content

Commit 3f7448e

Browse files
committed
added exclusions to config
1 parent 35e2fb4 commit 3f7448e

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

_config.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,3 @@ algolia:
1515
record_css_selector: '.page'
1616
excluded_files:
1717
- index.html
18-
- slides
19-
- _posts/2012-*
20-
- _posts/2013-*
21-
- _posts/2014-*
22-
- docs-1.8/*
23-
- docs-2.0/*

_plugins/search.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class AlgoliaSearchJekyllPush < Jekyll::Command
2+
class << self
3+
# Hook to exclude some files from indexing
4+
def custom_hook_excluded_file?(file)
5+
return true if file.path =~ %r{^/_site/}
6+
return true if file.path =~ %r{^/_docs-1.8/}
7+
return true if file.path =~ %r{^/_docs-2.0/}
8+
return true if file.path =~ %r{^/_slides/}
9+
return true if file.basename =~ %r{^2012-}
10+
return true if file.basename =~ %r{^2013-}
11+
return true if file.basename =~ %r{^2014-}
12+
false
13+
end
14+
end
15+
end

0 commit comments

Comments
 (0)