Closed rblades closed 6 years ago
I can take a look at a PR. Thanks!
Hi there,
I was wondering about the status of this issue. Would you like me to submit a pull request?
Thank you,
Rob
Yes.
Perfect, thanks. Pull for reference
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
Hi there,
I am having trouble adding a custom
plugin-search.js
file to my Gitbook. I modified the contents of theplugin-search.js
file in the package (located in/resources/gitbook/js
) and want to add and declare it as a custom file in myjs
folder.I created a
js
folder, a custom HTML file calledcustom-search.html
, and declared it in the_output.yml
by doing the following:My
custom-search.html
file contains the javascript declaration<script src="js/plugin-search.js"></script>
.When I build the book it adds the
<script src="js/plugin-search.js"></script>
before the closing of the<body>
tag, but this does not override the default<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
.The only other solution I can think of is loading a custom
gitbook.r
file and modifying the relevant source location below:The actual change to
plugin-search.js
increases the accessibility of the search function by adding a<label>
to assist screen readers. If you are interested, I can submit a pull request. You can view my changes on my Bookdown fork.Many thanks,
Rob