summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-theme-default/src/components
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-09-29 17:20:29 +0200
committerSamy Pesse <samypesse@gmail.com>2016-09-29 17:20:29 +0200
commit6015defe11bbdd3bc008cf194e7e88181fe165d0 (patch)
tree2dbb26295ada4de37a6a3778d99287ff8ad14e2e /packages/gitbook-plugin-theme-default/src/components
parent7f283791544195fa70c51003db9be3f029c014ef (diff)
downloadgitbook-6015defe11bbdd3bc008cf194e7e88181fe165d0.zip
gitbook-6015defe11bbdd3bc008cf194e7e88181fe165d0.tar.gz
gitbook-6015defe11bbdd3bc008cf194e7e88181fe165d0.tar.bz2
Integrate search in default theme
Diffstat (limited to 'packages/gitbook-plugin-theme-default/src/components')
-rw-r--r--packages/gitbook-plugin-theme-default/src/components/Page.js6
-rw-r--r--packages/gitbook-plugin-theme-default/src/components/Sidebar.js1
2 files changed, 5 insertions, 2 deletions
diff --git a/packages/gitbook-plugin-theme-default/src/components/Page.js b/packages/gitbook-plugin-theme-default/src/components/Page.js
index 177de20..8bd7045 100644
--- a/packages/gitbook-plugin-theme-default/src/components/Page.js
+++ b/packages/gitbook-plugin-theme-default/src/components/Page.js
@@ -11,8 +11,10 @@ const Page = React.createClass({
return (
<div className="Page page-wrapper">
- <GitBook.InjectedComponent matching={{ role: 'page:container' }} props={this.props}>
- <GitBook.HTMLContent html={page.content} />
+ <GitBook.InjectedComponent matching={{ role: 'search:results' }} props={this.props}>
+ <GitBook.InjectedComponent matching={{ role: 'page:container' }} props={this.props}>
+ <GitBook.HTMLContent html={page.content} />
+ </GitBook.InjectedComponent>
</GitBook.InjectedComponent>
</div>
);
diff --git a/packages/gitbook-plugin-theme-default/src/components/Sidebar.js b/packages/gitbook-plugin-theme-default/src/components/Sidebar.js
index 39ca271..c5f74ab 100644
--- a/packages/gitbook-plugin-theme-default/src/components/Sidebar.js
+++ b/packages/gitbook-plugin-theme-default/src/components/Sidebar.js
@@ -13,6 +13,7 @@ const Sidebar = React.createClass({
return (
<div className="Sidebar book-summary">
+ <GitBook.InjectedComponent matching={{ role: 'search:input' }} />
<Summary summary={summary} />
</div>
);