add search

This commit is contained in:
Prodesire 2018-05-10 22:51:45 +08:00
parent 9ae5a4d1ab
commit f4671f7bcb
1 changed files with 27 additions and 1 deletions

View File

@ -16,9 +16,35 @@
repo: 'https://github.com/flaggo/pydu',
loadSidebar: true,
loadNavbar: true,
subMaxLevel: 2
subMaxLevel: 2,
search: {
placeholder: {
'/zh-cn/': '搜索',
'/': 'Type to search',
},
noData: {
'/zh-cn/': '找不到结果',
'/': 'No Results',
}
},
plugins: [
function (hook) {
var footer = [
'<hr/>',
'<footer>',
'<span><a href="https://github.com/flaggo/pydu">pydu</a> &copy;2017 - 2018.</span>',
'<span>Powered By <a href="https://github.com/QingWei-Li/docsify" target="_blank">docsify</a>.</span>',
'</footer>'
].join('');
hook.afterEach(function (html) {
return html + footer
})
}
]
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
<script src="//unpkg.com/prismjs/components/prism-python.min.js"></script>
</body>
</html>