Fix Search Feature
First, the mkdocs search plugin should be enabled,
plugins:
- search
Then, it needs to be wired up.
{%- block search_button %}
{%- if 'search' in config['plugins'] %}
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div> <!-- end of book-search-input -->
{%- endif %}
{%- endblock %}
Source: base.html
GitBook uses javascript to dynamically generate the views,
but I'm faking it by using a practically empty push
script,
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({
"page": {},
"config": {},
"file": {},
"gitbook": {
"version": "3.2.3",
"time": "2018-06-16T01:44:55.224Z"
},
"basePath": ".",
"book": {
"language": ""
}
});
});
Source: js/main.js
I haven't really figured out how to get it to work yet, so for now I have it disabled.
Edited by Lucas Ramage