@remloyal/docsify-plugins
v1.0.0
Published
plugins for docsify
Maintainers
Readme
docsify-plugins
Firstly, make sure that the loadSidebar config is enabled,and the Markdown file _sidebar.md is provided in the root directory.
Then insert script into document just like the official plugins's usage
docsify-flexsearch
reference docsify-search
Usage
<script>
window.$docsify = {
// Complete configuration parameters
search: {
// Location in sidebar (default: prepended as first child)
// Optionally specify insertAfter or insertBefore (not both)
insertAfter: ".app-name", // CSS selector in .sidebar scope
insertBefore: ".sidebar-nav", // CSS selector in .sidebar scope
maxAge: 86400000, // Expiration time, the default one day
paths: [], // or 'auto'
placeholder: "Type to search",
// Localization
placeholder: {
"/zh-cn/": "搜索",
"/": "Type to search",
},
noData: "No Results!",
// Localization
noData: {
"/zh-cn/": "找不到结果",
"/": "No Results",
},
// Headline depth, 1 - 6
depth: 2,
hideOtherSidebarContent: true, // Deprecated as of v5
// To avoid search index collision
// between multiple websites under the same domain
namespace: "website-1",
// Use different indexes for path prefixes (namespaces).
// NOTE: Only works in 'auto' mode.
//
// When initialiazing an index, we look for the first path from the sidebar.
// If it matches the prefix from the list, we switch to the corresponding index.
pathNamespaces: ["/zh-cn", "/ru-ru", "/ru-ru/v1"],
// You can provide a regexp to match prefixes. In this case,
// the matching substring will be used to identify the index
pathNamespaces: /^(\/(zh-cn|ru-ru))?(\/(v1|v2))?/,
// 'sidebar' | 'modal', Default is sidebar, modalModal will use pop-up mode
mode: "sidebar",
},
};
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<!-- plugins -->
<script src="flexsearch/docsify-flexsearch.min.js"></script>docsify-sidebar-collapse
reference docsify-sidebar-collapse
