diff --git a/README.md b/README.md
index c4d73dc2..2fff2efb 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ Current features include:
arguments, derived types, programs, and modules from the source code.
- the ability to extract documentation from comments in the source code.
- LaTeX support in documentation using [MathJax](https://www.mathjax.org/).
-- searchable documentation, using Tipue Search.
+- searchable documentation, using [Lunr Search](https://lunrjs.com).
- author description and social media (including Github!) links.
- links to download the source code.
- links to individual files, both in their raw form or in HTML with syntax
diff --git a/docs/index.rst b/docs/index.rst
index fe56afe5..201e3de8 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -29,8 +29,8 @@ Current features include:
code,
- LaTeX support in documentation using `MathJax
`__,
-- searchable documentation, using `Tipue Search
- `__,
+- searchable documentation, using `Lunr Search
+ `__,
- author description and social media (including Github!) links,
- links to download the source code,
- links to individual files, both in their raw form or in HTML with
diff --git a/ford/output.py b/ford/output.py
index 0f958209..775987ed 100644
--- a/ford/output.py
+++ b/ford/output.py
@@ -289,7 +289,7 @@ def writeout(self) -> None:
if self.data["graph"]:
self.graphs.output_graphs(self.njobs)
if self.data["search"]:
- copytree(loc / "tipuesearch", out_dir / "tipuesearch")
+ copytree(loc / "search", out_dir / "search")
self.tipue.print_output()
try:
diff --git a/ford/search/load_search.js b/ford/search/load_search.js
new file mode 100644
index 00000000..3b6e61c3
--- /dev/null
+++ b/ford/search/load_search.js
@@ -0,0 +1,62 @@
+ var items = tipuesearch['pages'];
+ var documents = tipuesearch["pages"]
+ var counter = 0
+
+ for (item in documents){
+ documents[item]['id'] = counter;
+ counter = counter +1;
+ }
+
+ var idx = lunr(function () {
+ this.ref('id')
+ this.field('title')
+ this.field('url')
+ this.field('text', { boost: 10 })
+ this.field('tags')
+
+ items.forEach(function (doc) {
+ this.add(doc)
+ }, this)
+})
+
+function lunr_search(term) {
+ document.getElementById('lunrsearchresults').innerHTML = '
" + document.getElementById('lunrsearchresults').innerHTML;
+ //put results on the screen.
+ var results = idx.search(term);
+ if(results.length>0){
+ //console.log(idx.search(term));
+ //if results
+ for (var i = 0; i < results.length; i++) {
+ // more statements
+ var ref = results[i]['ref'];
+ var url = documents[ref]['url'];
+ var title = documents[ref]['title'];
+ var body = documents[ref]['text'].substring(0,160)+'...';
+ document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML + "