mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-04 19:45:08 -04:00
Added compatibility for mkdocs 0.17
This commit is contained in:
@@ -225,7 +225,9 @@ function initialize(config) { // eslint-disable-line func-style
|
||||
new Material.Event.Listener("[data-md-component=query]", [
|
||||
"focus", "keyup", "change"
|
||||
], new Material.Search.Result("[data-md-component=result]", () => {
|
||||
return fetch(`${config.url.base}/mkdocs/search_index.json`, {
|
||||
return fetch(`${config.url.base}/${
|
||||
config.version < "0.17" ? "mkdocs" : "search"
|
||||
}/search_index.json`, {
|
||||
credentials: "same-origin"
|
||||
}).then(response => response.json())
|
||||
.then(data => {
|
||||
|
||||
Reference in New Issue
Block a user