diff --git a/assets/js/README.md b/assets/js/README.md new file mode 100644 index 0000000..e69de29 diff --git a/assets/js/custom.js b/assets/js/custom.js new file mode 100644 index 0000000..995f352 --- /dev/null +++ b/assets/js/custom.js @@ -0,0 +1,9 @@ +var target = window.location.hash; + +window.location.hash = ""; + +$(document).ready(function() { + setTimeout(function() { + document.location.hash = target; + }, 50); +}); \ No newline at end of file diff --git a/book.json b/book.json index 5c67902..953af5d 100644 --- a/book.json +++ b/book.json @@ -1,5 +1,5 @@ { - "plugins": [ "edit-link", "theme-api", "jsfiddle", "custom-favicon", "simple-page-toc" ], + "plugins": [ "addcssjs", "edit-link", "theme-api", "jsfiddle", "custom-favicon", "simple-page-toc", "anchors" ], "pluginsConfig": { "edit-link": { "base": "https://github.com/i18next/react-i18next-gitbook/edit/master/", @@ -25,6 +25,9 @@ "simple-page-toc": { "maxDepth": 3, "skipFirstH1": true - } + }, + "addcssjs": { + "js": ["assets/js/custom.js"] + } } }