diff website/www/_templates/layout.html @ 7745:291afa77ad82

doc: trying to get search working. Searching for www works beter now: * no more javscript errors in console * search context blocks are displayed Had to add role="main" as that is used by the javascript to id the body of the page to extract text snippets. Had to set script_files to load all the needed javascript in order. Had to set data-url_root on a id'ed tag for javacript to work. On doc/_templates/layout.html replaced div with main tag and set id and duplicate role="main" for use by js querySelector.
author John Rouillard <rouilj@ieee.org>
date Mon, 26 Feb 2024 12:12:45 -0500
parents 67438e439da8
children bd013590d8d6
line wrap: on
line diff
--- a/website/www/_templates/layout.html	Mon Feb 26 11:23:36 2024 -0500
+++ b/website/www/_templates/layout.html	Mon Feb 26 12:12:45 2024 -0500
@@ -1,3 +1,7 @@
+{% set script_files = ['_static/jquery.js', '_static/doctools.js',
+                       '_static/language_data.js',
+                       '_static/searchtools.js',
+                       '_static/sphinx_highlight.js'] %}
 <!DOCTYPE html>
 <html lang="en">
   <head>
@@ -108,7 +112,7 @@
         <a title="{{ _('Index') }}" href="{{ pathto('genindex') }}">
 	  Index</a>
 	</nav>
-	<main id="main" tabindex="-1">
+	<main id="main" role="main" tabindex="-1">
        {% block body %} {% endblock %}
 	</main>
     </div>
@@ -149,6 +153,9 @@
 	    integrity="sha384-QGgNMMRFTi8ul5kHJ+vXysPe8gySvSA/Y3rpXZiRLzKPIw8CWY+a3ObKmQsyDr+a"
             async="" src="{{ pathto('_static/goatcounter_count.v3.js', 1) }}">
     </script>
+    <script id="documentation_options" data-url_root="{{ url_root }}"
+	    src="{{ pathto('_static/documentation_options.js', 1) }}">
+    </script>
     {%- if pagename != 'search' %}
     {%- for scriptfile in script_files %}
     <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>

Roundup Issue Tracker: http://roundup-tracker.org/