chiark / gitweb /
documentation/python: extend URL_FORMATTER also to static data.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 10 Sep 2019 20:06:27 +0000 (22:06 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 10 Sep 2019 20:10:14 +0000 (22:10 +0200)
38 files changed:
doc/documentation/python.rst
documentation/_search.py
documentation/doxygen.py
documentation/python.py
documentation/search.js
documentation/templates/doxygen/base.html
documentation/templates/python/base.html
documentation/test_doxygen/layout/pages.html
documentation/test_doxygen/layout_generated_doxyfile/index.html
documentation/test_doxygen/layout_minimal/index.html
documentation/test_doxygen/layout_search_binary/index.html
documentation/test_doxygen/layout_search_opensearch/index.html
documentation/test_doxygen/test_layout.py
documentation/test_doxygen/undocumented/File_8h.html
documentation/test_doxygen/undocumented/annotated.html
documentation/test_doxygen/undocumented/classClass.html
documentation/test_doxygen/undocumented/dir_4b0d5f8864bf89936129251a2d32609b.html
documentation/test_doxygen/undocumented/files.html
documentation/test_doxygen/undocumented/group__group.html
documentation/test_doxygen/undocumented/namespaceNamespace.html
documentation/test_doxygen/undocumented/structNamespace_1_1ClassInANamespace.html
documentation/test_python/layout/index.html
documentation/test_python/layout_search_binary/index.html
documentation/test_python/layout_search_open_search/index.html
documentation/test_python/link_formatting/c.link_formatting.Class.Sub.html
documentation/test_python/link_formatting/c.link_formatting.Class.html
documentation/test_python/link_formatting/c.link_formatting.pybind.Foo.html
documentation/test_python/link_formatting/m.link_formatting.html
documentation/test_python/link_formatting/m.link_formatting.pybind.html
documentation/test_python/link_formatting/m.link_formatting.sub.html
documentation/test_python/link_formatting/p.page.html [new file with mode: 0644]
documentation/test_python/link_formatting/page.rst
documentation/test_python/link_formatting/s.classes.html
documentation/test_python/link_formatting/s.modules.html
documentation/test_python/link_formatting/s.pages.html
documentation/test_python/link_formatting/tiny.png [new symlink]
documentation/test_python/test_layout.py
documentation/test_python/test_link_formatting.py

index 7fbe9d3b112716a736d83c8dae74cdae5ef62dbf..93f8068bf5be882851ddd3f3192779d2fa678fea 100644 (file)
@@ -229,7 +229,7 @@ Variable                            Description
                                     and the rendered HTML does not contain
                                     search-related UI or support. If not set,
                                     :py:`False` is used.
-:py:`SEARCH_DOWNLOAD_BINARY: bool`  Download search data as a binary to save
+:py:`SEARCH_DOWNLOAD_BINARY`        Download search data as a binary to save
                                     bandwidth and initial processing time. If
                                     not set, :py:`False` is used. See `Search options`_
                                     for more information.
@@ -351,7 +351,10 @@ Base85-encoded representation of the search binary and loading that
 asynchronously as a plain JavaScript file. This results in the search data
 being 25% larger, but since this is for serving from a local filesystem, it's
 not considered a problem. If your docs are accessed through a server (or you
-don't need Chrome support), enable the :py:`SEARCH_DOWNLOAD_BINARY` option.
+don't need Chrome support), set the :py:`SEARCH_DOWNLOAD_BINARY` option to
+:py:`True`. The search data are by default fetched from the current directory
+on the webserver, if you want to supply a different location, set it to a
+string and provide a `custom URL formatter <#custom-url-formatters>`_.
 
 The site can provide search engine metadata using the `OpenSearch <http://www.opensearch.org/>`_
 specification. On supported browsers this means you can add the search field to
@@ -389,23 +392,26 @@ search to a subdomain:
 The :py:`URL_FORMATTER` option allows you to control how *all* filenames and
 generated URLs look like. It takes an entry type and a "path" as a list of
 strings (so for example :py:`my.module.Class` is represented as
-:py:`['my', 'module', 'Class']`), returning a tuple a filename and an URL.
+:py:`['my', 'module', 'Class']`), returning a tuple of a filename and an URL.
 Those can be the same, but also different (for example a file getting saved
 into ``my/module/Class/index.html`` but the actual URL being
 ``https://docs.my.module/Class/``). The default implementation looks like this,
 producing both filenames and URLs in the form of ``my.module.Class.html``:
 
-.. code:: py
-
-    def default_url_formatter(type: EntryType, path: List[str]) -> Tuple[str, str]:
-        url = '.'.join(path) + '.html'
-        return url, url
+.. include:: ../../../documentation/python.py
+    :code: py
+    :start-after: # [default-url-formatter]
+    :end-before: # [/default-url-formatter]
 
 The ``type`` is an enum, if you don't want to fiddle with imports, compare
-:py:`str(type)` against a string, which is one of :py:`'PAGE'`, :py:`'MODULE'`,
-:py:`'CLASS'` or :py:`'SPECIAL'`. The :py:`'SPECIAL'` is for index pages and in
-that case the ``path`` has always just one item, one of :py:`'pages'`,
-:py:`'modules'` or :py:`'classes'`.
+:py:`type.name` against a string, which is one of :py:`'PAGE'`, :py:`'MODULE'`,
+:py:`'CLASS'`, :py:`'SPECIAL'` or :py:`'STATIC'`. The :py:`'SPECIAL'` is for
+index pages and in that case the ``path`` has always just one item, one of
+:py:`'pages'`, :py:`'modules'` or :py:`'classes'`. The :py:`'STATIC'` is for
+static data such as images or CSS files and the ``path`` is absolute input
+filename including the extension and except for search data (which are
+generated on-the-fly) it always exists. If the static path is an URL, the URL
+formatter is not called.
 
 The :py:`ID_FORMATTER` handles formatting of anchors on a page. Again it takes
 an entry type (which in this case is always one of :py:`'ENUM'`,
@@ -1078,14 +1084,15 @@ Filename                Use
 
 Each template gets passed all configuration values from the `Configuration`_
 table as-is, together with a :py:`URL` variable with URL of given output file.
-In addition to builtin Jinja2 filters, the ``basename_or_url`` filter returns
-either a basename of file path, if the path is relative; or a full URL, if the
-argument is an absolute URL. It's useful in cases like this:
+In addition to builtin Jinja2 filters, the ``format_url`` filter returns either
+a path formatted according to `custom URL formatters`_, if the path is relative;
+or a full URL, if the argument is an absolute URL. It's useful in cases like
+this:
 
 .. code:: html+jinja
 
   {% for css in HTML_EXTRA_STYLESHEET %}
-  <link rel="stylesheet" href="{{ css|basename_or_url }}" />
+  <link rel="stylesheet" href="{{ css|format_url|e }}" />
   {% endfor %}
 
 The actual page contents are provided in a :py:`page` object, which has the
index 7d6e26562b5484d6d1fe09258b900cde180386fd..cd8b64389f34a7ba865ebaa9250f17338cbd6825 100644 (file)
@@ -33,6 +33,7 @@ from typing import List, Tuple
 
 # Version 0 was without the type map
 searchdata_format_version = 1
+search_filename = f'search-v{searchdata_format_version}.js'
 searchdata_filename = f'searchdata-v{searchdata_format_version}.bin'
 searchdata_filename_b85 = f'searchdata-v{searchdata_format_version}.js'
 
index 10992f5df3e15385cf277b7ca250026e4991469e..0e39cccf1111843080ac053a40d29a053391b69d 100755 (executable)
@@ -47,7 +47,7 @@ from pygments import highlight
 from pygments.formatters import HtmlFormatter
 from pygments.lexers import TextLexer, BashSessionLexer, get_lexer_by_name, find_lexer_class_for_filename
 
-from _search import CssClass, ResultFlag, ResultMap, Trie, serialize_search_data, base85encode_search_data, searchdata_filename, searchdata_filename_b85, searchdata_format_version
+from _search import CssClass, ResultFlag, ResultMap, Trie, serialize_search_data, base85encode_search_data, search_filename, searchdata_filename, searchdata_filename_b85, searchdata_format_version
 
 sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../plugins'))
 import dot2svg
@@ -3596,6 +3596,10 @@ def run(doxyfile, *, templates=default_templates, wildcard=default_wildcard, ind
         # Skip absolute URLs
         if urllib.parse.urlparse(i).netloc: continue
 
+        # The search.js is special, we encode the version information into its
+        # filename
+        file_out = search_filename if i == 'search.js' else i
+
         # If file is found relative to the Doxyfile, use that
         if os.path.exists(os.path.join(state.basedir, i)):
             i = os.path.join(state.basedir, i)
@@ -3605,7 +3609,7 @@ def run(doxyfile, *, templates=default_templates, wildcard=default_wildcard, ind
             i = os.path.join(os.path.dirname(os.path.realpath(__file__)), i)
 
         logging.debug("copying {} to output".format(i))
-        shutil.copy(i, os.path.join(html_output, os.path.basename(i)))
+        shutil.copy(i, os.path.join(html_output, os.path.basename(file_out)))
 
     # Save updated math cache file
     if state.doxyfile['M_MATH_CACHE_FILE']:
index 36cd04f96cc0d9f84a75a16f135a48a4115f359f..b6331f52d4cd6a124acb890382b6aa1578b17d0f 100755 (executable)
@@ -53,7 +53,7 @@ from docutils.transforms import Transform
 
 import jinja2
 
-from _search import CssClass, ResultFlag, ResultMap, Trie, serialize_search_data, base85encode_search_data, searchdata_format_version, searchdata_filename, searchdata_filename_b85
+from _search import CssClass, ResultFlag, ResultMap, Trie, serialize_search_data, base85encode_search_data, searchdata_format_version, search_filename, searchdata_filename, searchdata_filename_b85
 
 sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../plugins'))
 import m.htmlsanity
@@ -77,6 +77,8 @@ class EntryType(Enum):
     # Types not exposed to search are below. Deliberately set to large values
     # so their accidental use triggers assertions when building search data.
 
+    # Statically linked data, such as images. Passed only to the URL_FORMATTER.
+    STATIC = 98
     # One of files from special_pages. Doesn't make sense to include in the
     # search.
     SPECIAL = 99
@@ -97,11 +99,22 @@ search_type_map = [
     (CssClass.DEFAULT, "data")
 ]
 
+# TODO: what about nested pages, how to format?
+# [default-url-formatter]
 def default_url_formatter(type: EntryType, path: List[str]) -> Tuple[str, str]:
-    # TODO: what about nested pages, how to format?
+    if type == EntryType.STATIC:
+        url = os.path.basename(path[0])
+
+        # Encode version information into the search driver
+        if url == 'search.js':
+            url = 'search-v{}.js'.format(searchdata_format_version)
+
+        return url, url
+
     url = '.'.join(path) + '.html'
-    assert '/' not in url # TODO
+    assert '/' not in url
     return url, url
+# [/default-url-formatter]
 
 def default_id_formatter(type: EntryType, path: List[str]) -> str:
     # Encode pybind11 function overloads into the anchor (hash them, like Rust
@@ -1998,9 +2011,11 @@ class ExtractImages(Transform):
     default_priority = 991
 
     # There is no simple way to have stateful transforms (the publisher always
-    # gets just the class, not the instance) so we have to use this
+    # gets just the class, not the instance) so we have to make all data
+    # awfully global. UGH.
     # TODO: maybe the pending nodes could solve this?
-    external_data = set()
+    _url_formatter = None
+    _external_data = set()
 
     def __init__(self, document, startnode):
         Transform.__init__(self, document, startnode=startnode)
@@ -2013,16 +2028,21 @@ class ExtractImages(Transform):
 
             # TODO: is there a non-private access to current document source
             # path?
-            ExtractImages._external_data.add(os.path.join(os.path.dirname(self.document.settings._source), image['uri']) if isinstance(self.document.settings._source, str) else image['uri'])
+            absolute_uri = os.path.join(os.path.dirname(self.document.settings._source), image['uri']) if isinstance(self.document.settings._source, str) else image['uri']
+            ExtractImages._external_data.add(absolute_uri)
 
-            # Patch the URL to be just the filename
-            image['uri'] = os.path.basename(image['uri'])
+            # Patch the URL according to the URL formatter
+            image['uri'] = ExtractImages._url_formatter(EntryType.STATIC, [absolute_uri])[1]
 
 class DocumentationWriter(m.htmlsanity.SaneHtmlWriter):
     def get_transforms(self):
         return m.htmlsanity.SaneHtmlWriter.get_transforms(self) + [ExtractImages]
 
 def publish_rst(state: State, source, *, source_path=None, translator_class=m.htmlsanity.SaneHtmlTranslator):
+    # Make the URL formatter known to the image extractor so it can use it for
+    # patching the URLs
+    ExtractImages._url_formatter = state.config['URL_FORMATTER']
+
     pub = docutils.core.Publisher(
         writer=DocumentationWriter(),
         source_class=docutils.io.StringInput,
@@ -2326,10 +2346,18 @@ def run(basedir, config, *, templates=default_templates, search_add_lookahead_ba
     env = jinja2.Environment(
         loader=jinja2.FileSystemLoader(templates), trim_blocks=True,
         lstrip_blocks=True, enable_async=True)
-    # Filter to return file basename or the full URL, if absolute
-    def basename_or_url(path):
+    # Filter to return formatted URL or the full URL, if already absolute
+    def format_url(path):
         if urllib.parse.urlparse(path).netloc: return path
-        return os.path.basename(path)
+
+        # If file is found relative to the conf file, use that
+        if os.path.exists(os.path.join(config['INPUT'], path)):
+            path = os.path.join(config['INPUT'], path)
+        # Otherwise use path relative to script directory
+        else:
+            path = os.path.join(os.path.dirname(os.path.realpath(__file__)), path)
+
+        return config['URL_FORMATTER'](EntryType.STATIC, [path])[1]
     # Filter to return URL for given symbol. If the path is a string, first try
     # to treat it as an URL -- either it needs to have the scheme or at least
     # one slash for relative links (in contrast, Python names don't have
@@ -2342,7 +2370,7 @@ def run(basedir, config, *, templates=default_templates, search_add_lookahead_ba
         entry = state.name_map['.'.join(path)]
         return entry.url
 
-    env.filters['basename_or_url'] = basename_or_url
+    env.filters['format_url'] = format_url
     env.filters['path_to_url'] = path_to_url
     env.filters['urljoin'] = urljoin
 
@@ -2527,11 +2555,16 @@ def run(basedir, config, *, templates=default_templates, search_add_lookahead_ba
 
         data = build_search_data(state, add_lookahead_barriers=search_add_lookahead_barriers, merge_subtrees=search_merge_subtrees, merge_prefixes=search_merge_prefixes)
 
+        # Joining twice, first before passing those to the URL formatter and
+        # second after. If SEARCH_DOWNLOAD_BINARY is a string, use that as a
+        # filename.
+        # TODO: any chance we could write the file *before* it gets ever passed
+        # to URL formatters so we can add cache buster hashes to its URL?
         if state.config['SEARCH_DOWNLOAD_BINARY']:
-            with open(os.path.join(config['OUTPUT'], searchdata_filename), 'wb') as f:
+            with open(os.path.join(config['OUTPUT'], config['URL_FORMATTER'](EntryType.STATIC, [os.path.join(config['OUTPUT'], state.config['SEARCH_DOWNLOAD_BINARY'] if isinstance(state.config['SEARCH_DOWNLOAD_BINARY'], str) else searchdata_filename)])[0]), 'wb') as f:
                 f.write(data)
         else:
-            with open(os.path.join(config['OUTPUT'], searchdata_filename_b85), 'wb') as f:
+            with open(os.path.join(config['OUTPUT'], config['URL_FORMATTER'](EntryType.STATIC, [os.path.join(config['OUTPUT'], searchdata_filename_b85)])[0]), 'wb') as f:
                 f.write(base85encode_search_data(data))
 
         # OpenSearch metadata, in case we have the base URL
@@ -2563,7 +2596,7 @@ def run(basedir, config, *, templates=default_templates, search_add_lookahead_ba
             i = os.path.join(os.path.dirname(os.path.realpath(__file__)), i)
 
         logging.debug("copying %s to output", i)
-        shutil.copy(i, os.path.join(config['OUTPUT'], os.path.basename(i)))
+        shutil.copy(i, os.path.join(config['OUTPUT'], config['URL_FORMATTER'](EntryType.STATIC, [i])[0]))
 
     # Call all registered finalization hooks
     for hook in state.hooks_post_run: hook()
index 67e8e7031293d523317477f6061c21de17e277da..82b9fd426e7ef5e3dd18487679e474fcfb6324e3 100644 (file)
@@ -117,11 +117,11 @@ var Search = {
         return true;
     },
 
-    download: /* istanbul ignore next */ function(urlBase) {
+    download: /* istanbul ignore next */ function(url) {
         var req = window.XDomainRequest ? new XDomainRequest() : new XMLHttpRequest();
         if(!req) return;
 
-        req.open("GET", urlBase + "searchdata-v" + this.formatVersion + ".bin", true);
+        req.open("GET", url, true);
         req.responseType = 'arraybuffer';
         req.onreadystatechange = function() {
             if(req.readyState != 4) return;
index 2421f08d7843c1033f7e53556861330617811413..69d77f635aae5c3aa3d227487828a5b6e41c726f 100644 (file)
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v{{ SEARCHDATA_FORMAT_VERSION }}.js"></script>
 {% if M_SEARCH_DOWNLOAD_BINARY %}
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v{{ SEARCHDATA_FORMAT_VERSION }}.bin');
 </script>
 {% else %}
 <script src="searchdata-v{{ SEARCHDATA_FORMAT_VERSION }}.js" async="async"></script>
index ecde3feb8103fc3aa6fc91dc75ea0bb62e43cf76..09857cb8ae02b378a697bb4c5a53005449d0fbdd 100644 (file)
@@ -4,10 +4,10 @@
   <meta charset="UTF-8" />
   <title>{% block title %}{{ PROJECT_TITLE }}{% if PROJECT_SUBTITLE %} {{ PROJECT_SUBTITLE }}{% endif %}{% endblock %}</title>
   {% for css in STYLESHEETS %}
-  <link rel="stylesheet" href="{{ css|basename_or_url|e }}" />
+  <link rel="stylesheet" href="{{ css|format_url|e }}" />
   {% endfor %}
   {% if FAVICON %}
-  <link rel="icon" href="{{ FAVICON[0]|basename_or_url|e }}" type="{{ FAVICON[1] }}" />
+  <link rel="icon" href="{{ FAVICON[0]|format_url|e }}" type="{{ FAVICON[1] }}" />
   {% endif %}
   {% if not SEARCH_DISABLED and SEARCH_BASE_URL %}
   <link rel="search" type="application/opensearchdescription+xml" href="opensearch.xml" title="Search {{ PROJECT_TITLE }} documentation" />
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="{{ 'search.js'|format_url|e }}"></script>
 {% if SEARCH_DOWNLOAD_BINARY %}
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download({% if SEARCH_DOWNLOAD_BINARY is string %}'{{ SEARCH_DOWNLOAD_BINARY.format(SEARCHDATA_FORMAT_VERSION)|format_url|e }}'{% else %}window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v{{ SEARCHDATA_FORMAT_VERSION }}.bin'{% endif %});
 </script>
 {% else %}
-<script src="searchdata-v{{ SEARCHDATA_FORMAT_VERSION }}.js" async="async"></script>
+<script src="{{ 'searchdata-v{}.js'.format(SEARCHDATA_FORMAT_VERSION)|format_url|e }}" async="async"></script>
 {% endif %}
 {% endif %}
 {% if FINE_PRINT %}
index 663c778a419bc0b86dbaaf521518632b5927bb90..c94e94ee6a592c0552c7951b4d894513bf025a2a 100644 (file)
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script src="searchdata-v1.js" async="async"></script>
 <footer><nav>
   <div class="m-container">
index dd26202286cd0e58013edbf610787b627eeee079..58a513c5c92d44cce8afe4e00bf0a55471e7e301 100644 (file)
@@ -84,7 +84,7 @@
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script src="searchdata-v1.js" async="async"></script>
 <footer><nav>
   <div class="m-container">
index dd26202286cd0e58013edbf610787b627eeee079..58a513c5c92d44cce8afe4e00bf0a55471e7e301 100644 (file)
@@ -84,7 +84,7 @@
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script src="searchdata-v1.js" async="async"></script>
 <footer><nav>
   <div class="m-container">
index 37f498246654b20bef5ab893c71b8eecf731427e..45b0bb12a26254a3b7549c6f61ae229603c2f871 100644 (file)
@@ -68,9 +68,9 @@
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v1.bin');
 </script>
 </body>
 </html>
index 60f336fc2cdd48ee16463f9f4407a22e3edf5ccf..d8c46891ccce29d28ff2177b34d356a473662203 100644 (file)
@@ -70,7 +70,7 @@
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script src="searchdata-v1.js" async="async"></script>
 </body>
 </html>
index 65599bd10d2ddc681e670a30f52016dadcf31368..e9d7fb127ebf2805671dd629622bad5b2c617ac6 100644 (file)
@@ -25,7 +25,7 @@
 import os
 import subprocess
 
-from _search import searchdata_filename, searchdata_filename_b85
+from _search import search_filename, searchdata_filename, searchdata_filename_b85
 from . import BaseTestCase
 
 class Layout(BaseTestCase):
@@ -36,7 +36,7 @@ class Layout(BaseTestCase):
         self.run_doxygen(wildcard='index.xml')
         self.assertEqual(*self.actual_expected_contents('pages.html'))
         self.assertTrue(os.path.exists(os.path.join(self.path, 'html', 'm-dark+documentation.compiled.css')))
-        self.assertTrue(os.path.exists(os.path.join(self.path, 'html', 'search.js')))
+        self.assertTrue(os.path.exists(os.path.join(self.path, 'html', search_filename)))
         self.assertTrue(os.path.exists(os.path.join(self.path, 'html', searchdata_filename_b85)))
         self.assertTrue(os.path.exists(os.path.join(self.path, 'html', 'favicon-light.png')))
 
index b4543e8bb22f5ac9070d838ce47c068179b6e8e9..ad8e58c42602e721e1b8eec5bdd0ca90b0f7976b 100644 (file)
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v1.bin');
 </script>
 </body>
 </html>
index c2c14e711472eb3c1e36a660c6fb6bbaea35d7b4..c0d717c2df2bd4406d20d06054d5e1b78bcd3157 100644 (file)
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v1.bin');
 </script>
 </body>
 </html>
index fd5c5b6c11de0db90bce4fdc196fca6588f4ade2..77809bbee5faa77655bb78d1bae65084457b56fb 100644 (file)
@@ -84,9 +84,9 @@
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v1.bin');
 </script>
 </body>
 </html>
index 5ca37f1bf8ac64e3e06dd1429301881723239a39..9ed4b17af5fe2cbbafed3a77e117983cbcc61fa4 100644 (file)
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v1.bin');
 </script>
 </body>
 </html>
index c9d4a4cd9e9219abf94f99714ffd6923fac03515..00d375d3989e9f09b10ef0415b46f030b4bab02d 100644 (file)
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v1.bin');
 </script>
 </body>
 </html>
index 1f56f81741d93f541b86977182f13d05a1dbb98b..e9320bf797bdfe726786d84fb02b81cd39cb3548 100644 (file)
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v1.bin');
 </script>
 </body>
 </html>
index e8157188f03bc9422f4bdeaa9dbc4e4bebbe2240..c41c4330dd0eabdc8ac609958bed8022eeef4391 100644 (file)
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v1.bin');
 </script>
 </body>
 </html>
index 80a82c1b0b725af8579aedef66d4b6bf59c081d9..d96bc18442230ededb1886acdc8a8b0f9791d497 100644 (file)
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v1.bin');
 </script>
 </body>
 </html>
index 543ae9a7ea7f3a9c34543b17ca0dbcf8641aa90f..2cc11c43492655a362da5b3d89ecfdbb45276703 100644 (file)
@@ -90,7 +90,7 @@
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script src="searchdata-v1.js" async="async"></script>
 <footer><nav>
   <div class="m-container">
index 89163ee2c692c1f8050691945e8d3c959be3c0aa..468e43da1c42f5067f73c5aa4ff93c70481fcd39 100644 (file)
@@ -77,9 +77,9 @@
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script>
-  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1));
+  Search.download(window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'searchdata-v1.bin');
 </script>
 </body>
 </html>
index 509f944185cce1d215ce2fdbcb19c38a945b6ee5..170ea5ed290dbb8e2d77a00d66c2bcebe3f7d039 100644 (file)
@@ -70,7 +70,7 @@
     </div>
   </div>
 </div>
-<script src="search.js"></script>
+<script src="search-v1.js"></script>
 <script src="searchdata-v1.js" async="async"></script>
 </body>
 </html>
index 083341928f55c6bfff0a16daf60c4bf36c518ebf..7e20bd786e637321ac18fcbba2448d0d67759028 100644 (file)
@@ -4,7 +4,8 @@
   <meta charset="UTF-8" />
   <title>link_formatting.Class.Sub | My Python Project</title>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
-  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+  <link rel="stylesheet" href="t.m-dark+documentation.compiled.css#this-is-an-url" />
+  <link rel="icon" href="t.favicon-light.png#this-is-an-url" type="image/png" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 </head>
 <body>
@@ -13,6 +14,9 @@
     <div class="m-row">
       <a href="s.index.html#this-is-an-url" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Python Project</a>
       <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
+        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+          <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+        </svg></a>
         <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
         <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
       </div>
@@ -27,6 +31,9 @@
             <li><a href="p.page.html#this-is-an-url">A page</a></li>
             <li><a href="m.link_formatting.html#this-is-an-url">A module</a></li>
             <li><a href="c.link_formatting.Class.html#this-is-an-url">The class</a></li>
+            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+              <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+            </svg></a></li>
           </ol>
         </div>
       </div>
     </div>
   </div>
 </article></main>
+<div class="m-doc-search" id="search">
+  <a href="#!" onclick="return hideSearch()"></a>
+  <div class="m-container">
+    <div class="m-row">
+      <div class="m-col-m-8 m-push-m-2">
+        <div class="m-doc-search-header m-text m-small">
+          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
+          <div id="search-symbolcount">&hellip;</div>
+        </div>
+        <div class="m-doc-search-content">
+          <form>
+            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
+          </form>
+          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
+          <div id="search-help" class="m-text m-dim m-text-center">
+            <p>blub?</p>
+          </div>
+          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
+          <ul id="search-results"></ul>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+<script src="t.search-v1.js#this-is-an-url"></script>
+<script>
+  Search.download('t.absolutesearchdata-v1.bin#this-is-an-url');
+</script>
 </body>
 </html>
index 54167493fd4e7a42e9dacc63b45433c5b524490c..c79713db49cbf43ed4677d41dcf061beb0d6b638 100644 (file)
@@ -4,7 +4,8 @@
   <meta charset="UTF-8" />
   <title>link_formatting.Class | My Python Project</title>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
-  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+  <link rel="stylesheet" href="t.m-dark+documentation.compiled.css#this-is-an-url" />
+  <link rel="icon" href="t.favicon-light.png#this-is-an-url" type="image/png" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 </head>
 <body>
@@ -13,6 +14,9 @@
     <div class="m-row">
       <a href="s.index.html#this-is-an-url" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Python Project</a>
       <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
+        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+          <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+        </svg></a>
         <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
         <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
       </div>
@@ -27,6 +31,9 @@
             <li><a href="p.page.html#this-is-an-url">A page</a></li>
             <li><a href="m.link_formatting.html#this-is-an-url">A module</a></li>
             <li><a href="c.link_formatting.Class.html#this-is-an-url">The class</a></li>
+            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+              <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+            </svg></a></li>
           </ol>
         </div>
       </div>
     </div>
   </div>
 </article></main>
+<div class="m-doc-search" id="search">
+  <a href="#!" onclick="return hideSearch()"></a>
+  <div class="m-container">
+    <div class="m-row">
+      <div class="m-col-m-8 m-push-m-2">
+        <div class="m-doc-search-header m-text m-small">
+          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
+          <div id="search-symbolcount">&hellip;</div>
+        </div>
+        <div class="m-doc-search-content">
+          <form>
+            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
+          </form>
+          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
+          <div id="search-help" class="m-text m-dim m-text-center">
+            <p>blub?</p>
+          </div>
+          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
+          <ul id="search-results"></ul>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+<script src="t.search-v1.js#this-is-an-url"></script>
+<script>
+  Search.download('t.absolutesearchdata-v1.bin#this-is-an-url');
+</script>
 </body>
 </html>
index 6e37feeb64f36f154be841a4988aae51656024ec..2afa6bc0d534e7f90f17ddebf6526c88cb9be584 100644 (file)
@@ -4,7 +4,8 @@
   <meta charset="UTF-8" />
   <title>link_formatting.pybind.Foo | My Python Project</title>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
-  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+  <link rel="stylesheet" href="t.m-dark+documentation.compiled.css#this-is-an-url" />
+  <link rel="icon" href="t.favicon-light.png#this-is-an-url" type="image/png" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 </head>
 <body>
@@ -13,6 +14,9 @@
     <div class="m-row">
       <a href="s.index.html#this-is-an-url" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Python Project</a>
       <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
+        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+          <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+        </svg></a>
         <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
         <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
       </div>
@@ -27,6 +31,9 @@
             <li><a href="p.page.html#this-is-an-url">A page</a></li>
             <li><a href="m.link_formatting.html#this-is-an-url">A module</a></li>
             <li><a href="c.link_formatting.Class.html#this-is-an-url">The class</a></li>
+            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+              <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+            </svg></a></li>
           </ol>
         </div>
       </div>
     </div>
   </div>
 </article></main>
+<div class="m-doc-search" id="search">
+  <a href="#!" onclick="return hideSearch()"></a>
+  <div class="m-container">
+    <div class="m-row">
+      <div class="m-col-m-8 m-push-m-2">
+        <div class="m-doc-search-header m-text m-small">
+          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
+          <div id="search-symbolcount">&hellip;</div>
+        </div>
+        <div class="m-doc-search-content">
+          <form>
+            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
+          </form>
+          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
+          <div id="search-help" class="m-text m-dim m-text-center">
+            <p>blub?</p>
+          </div>
+          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
+          <ul id="search-results"></ul>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+<script src="t.search-v1.js#this-is-an-url"></script>
+<script>
+  Search.download('t.absolutesearchdata-v1.bin#this-is-an-url');
+</script>
 </body>
 </html>
index 74d5aeb43fcdc90139c8855d8a552f190d8b4aeb..8c6e07b2456d0536a33cc62a93fed389403732f9 100644 (file)
@@ -4,7 +4,8 @@
   <meta charset="UTF-8" />
   <title>link_formatting | My Python Project</title>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
-  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+  <link rel="stylesheet" href="t.m-dark+documentation.compiled.css#this-is-an-url" />
+  <link rel="icon" href="t.favicon-light.png#this-is-an-url" type="image/png" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 </head>
 <body>
@@ -13,6 +14,9 @@
     <div class="m-row">
       <a href="s.index.html#this-is-an-url" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Python Project</a>
       <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
+        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+          <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+        </svg></a>
         <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
         <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
       </div>
@@ -27,6 +31,9 @@
             <li><a href="p.page.html#this-is-an-url">A page</a></li>
             <li><a href="m.link_formatting.html#this-is-an-url">A module</a></li>
             <li><a href="c.link_formatting.Class.html#this-is-an-url">The class</a></li>
+            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+              <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+            </svg></a></li>
           </ol>
         </div>
       </div>
     </div>
   </div>
 </article></main>
+<div class="m-doc-search" id="search">
+  <a href="#!" onclick="return hideSearch()"></a>
+  <div class="m-container">
+    <div class="m-row">
+      <div class="m-col-m-8 m-push-m-2">
+        <div class="m-doc-search-header m-text m-small">
+          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
+          <div id="search-symbolcount">&hellip;</div>
+        </div>
+        <div class="m-doc-search-content">
+          <form>
+            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
+          </form>
+          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
+          <div id="search-help" class="m-text m-dim m-text-center">
+            <p>blub?</p>
+          </div>
+          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
+          <ul id="search-results"></ul>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+<script src="t.search-v1.js#this-is-an-url"></script>
+<script>
+  Search.download('t.absolutesearchdata-v1.bin#this-is-an-url');
+</script>
 </body>
 </html>
index b0152d3e47499adf4700460f7e6625984468a5c2..8b7ba920f4f925622139aa0a09607301ae5d2b56 100644 (file)
@@ -4,7 +4,8 @@
   <meta charset="UTF-8" />
   <title>link_formatting.pybind | My Python Project</title>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
-  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+  <link rel="stylesheet" href="t.m-dark+documentation.compiled.css#this-is-an-url" />
+  <link rel="icon" href="t.favicon-light.png#this-is-an-url" type="image/png" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 </head>
 <body>
@@ -13,6 +14,9 @@
     <div class="m-row">
       <a href="s.index.html#this-is-an-url" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Python Project</a>
       <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
+        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+          <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+        </svg></a>
         <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
         <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
       </div>
@@ -27,6 +31,9 @@
             <li><a href="p.page.html#this-is-an-url">A page</a></li>
             <li><a href="m.link_formatting.html#this-is-an-url">A module</a></li>
             <li><a href="c.link_formatting.Class.html#this-is-an-url">The class</a></li>
+            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+              <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+            </svg></a></li>
           </ol>
         </div>
       </div>
     </div>
   </div>
 </article></main>
+<div class="m-doc-search" id="search">
+  <a href="#!" onclick="return hideSearch()"></a>
+  <div class="m-container">
+    <div class="m-row">
+      <div class="m-col-m-8 m-push-m-2">
+        <div class="m-doc-search-header m-text m-small">
+          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
+          <div id="search-symbolcount">&hellip;</div>
+        </div>
+        <div class="m-doc-search-content">
+          <form>
+            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
+          </form>
+          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
+          <div id="search-help" class="m-text m-dim m-text-center">
+            <p>blub?</p>
+          </div>
+          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
+          <ul id="search-results"></ul>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+<script src="t.search-v1.js#this-is-an-url"></script>
+<script>
+  Search.download('t.absolutesearchdata-v1.bin#this-is-an-url');
+</script>
 </body>
 </html>
index 9dcb92096ac3f8c3e801f9113316f1c02580c84b..67704b517a1f0b9021a3b1bb6c7335db10de7157 100644 (file)
@@ -4,7 +4,8 @@
   <meta charset="UTF-8" />
   <title>link_formatting.sub | My Python Project</title>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
-  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+  <link rel="stylesheet" href="t.m-dark+documentation.compiled.css#this-is-an-url" />
+  <link rel="icon" href="t.favicon-light.png#this-is-an-url" type="image/png" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 </head>
 <body>
@@ -13,6 +14,9 @@
     <div class="m-row">
       <a href="s.index.html#this-is-an-url" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Python Project</a>
       <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
+        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+          <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+        </svg></a>
         <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
         <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
       </div>
@@ -27,6 +31,9 @@
             <li><a href="p.page.html#this-is-an-url">A page</a></li>
             <li><a href="m.link_formatting.html#this-is-an-url">A module</a></li>
             <li><a href="c.link_formatting.Class.html#this-is-an-url">The class</a></li>
+            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+              <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+            </svg></a></li>
           </ol>
         </div>
       </div>
     </div>
   </div>
 </article></main>
+<div class="m-doc-search" id="search">
+  <a href="#!" onclick="return hideSearch()"></a>
+  <div class="m-container">
+    <div class="m-row">
+      <div class="m-col-m-8 m-push-m-2">
+        <div class="m-doc-search-header m-text m-small">
+          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
+          <div id="search-symbolcount">&hellip;</div>
+        </div>
+        <div class="m-doc-search-content">
+          <form>
+            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
+          </form>
+          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
+          <div id="search-help" class="m-text m-dim m-text-center">
+            <p>blub?</p>
+          </div>
+          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
+          <ul id="search-results"></ul>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+<script src="t.search-v1.js#this-is-an-url"></script>
+<script>
+  Search.download('t.absolutesearchdata-v1.bin#this-is-an-url');
+</script>
 </body>
 </html>
diff --git a/documentation/test_python/link_formatting/p.page.html b/documentation/test_python/link_formatting/p.page.html
new file mode 100644 (file)
index 0000000..4b800ac
--- /dev/null
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8" />
+  <title>This is a page | My Python Project</title>
+  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
+  <link rel="stylesheet" href="t.m-dark+documentation.compiled.css#this-is-an-url" />
+  <link rel="icon" href="t.favicon-light.png#this-is-an-url" type="image/png" />
+  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+</head>
+<body>
+<header><nav id="navigation">
+  <div class="m-container">
+    <div class="m-row">
+      <a href="s.index.html#this-is-an-url" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Python Project</a>
+      <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
+        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+          <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+        </svg></a>
+        <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
+        <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
+      </div>
+      <div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
+        <div class="m-row">
+          <ol class="m-col-t-12 m-col-m-none">
+            <li><a href="s.pages.html#this-is-an-url">Pages</a></li>
+            <li><a href="s.modules.html#this-is-an-url">Modules</a></li>
+            <li><a href="s.classes.html#this-is-an-url">Classes</a></li>
+          </ol>
+          <ol class="m-col-t-6 m-col-m-none" start="4">
+            <li><a href="p.page.html#this-is-an-url">A page</a></li>
+            <li><a href="m.link_formatting.html#this-is-an-url">A module</a></li>
+            <li><a href="c.link_formatting.Class.html#this-is-an-url">The class</a></li>
+            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+              <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+            </svg></a></li>
+          </ol>
+        </div>
+      </div>
+    </div>
+  </div>
+</nav></header>
+<main><article>
+  <div class="m-container m-container-inflatable">
+    <div class="m-row">
+      <div class="m-col-l-10 m-push-l-1">
+        <h1>
+          This is a page
+        </h1>
+<img class="m-image" src="t.tiny.png#this-is-an-url" style="width: 60px" />
+      </div>
+    </div>
+  </div>
+</article></main>
+<div class="m-doc-search" id="search">
+  <a href="#!" onclick="return hideSearch()"></a>
+  <div class="m-container">
+    <div class="m-row">
+      <div class="m-col-m-8 m-push-m-2">
+        <div class="m-doc-search-header m-text m-small">
+          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
+          <div id="search-symbolcount">&hellip;</div>
+        </div>
+        <div class="m-doc-search-content">
+          <form>
+            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
+          </form>
+          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
+          <div id="search-help" class="m-text m-dim m-text-center">
+            <p>blub?</p>
+          </div>
+          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
+          <ul id="search-results"></ul>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+<script src="t.search-v1.js#this-is-an-url"></script>
+<script>
+  Search.download('t.absolutesearchdata-v1.bin#this-is-an-url');
+</script>
+</body>
+</html>
index aae94066f009a81b2e31f3f8946d37a4f1918a32..64cf930556ac62d89c22a41186d2e0a9909348b3 100644 (file)
@@ -1,2 +1,5 @@
 This is a page
 ##############
+
+.. image:: tiny.png
+    :scale: 2000%
index 6751c5d342c5f482b479572234ab7ca6def6ce17..38ef7609c06b2df6f3520b203230a6ff72a61c61 100644 (file)
@@ -4,7 +4,8 @@
   <meta charset="UTF-8" />
   <title>My Python Project</title>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
-  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+  <link rel="stylesheet" href="t.m-dark+documentation.compiled.css#this-is-an-url" />
+  <link rel="icon" href="t.favicon-light.png#this-is-an-url" type="image/png" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 </head>
 <body>
@@ -13,6 +14,9 @@
     <div class="m-row">
       <a href="s.index.html#this-is-an-url" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Python Project</a>
       <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
+        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+          <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+        </svg></a>
         <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
         <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
       </div>
@@ -27,6 +31,9 @@
             <li><a href="p.page.html#this-is-an-url">A page</a></li>
             <li><a href="m.link_formatting.html#this-is-an-url">A module</a></li>
             <li><a href="c.link_formatting.Class.html#this-is-an-url">The class</a></li>
+            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+              <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+            </svg></a></li>
           </ol>
         </div>
       </div>
     </div>
   </div>
 </article></main>
+<div class="m-doc-search" id="search">
+  <a href="#!" onclick="return hideSearch()"></a>
+  <div class="m-container">
+    <div class="m-row">
+      <div class="m-col-m-8 m-push-m-2">
+        <div class="m-doc-search-header m-text m-small">
+          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
+          <div id="search-symbolcount">&hellip;</div>
+        </div>
+        <div class="m-doc-search-content">
+          <form>
+            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
+          </form>
+          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
+          <div id="search-help" class="m-text m-dim m-text-center">
+            <p>blub?</p>
+          </div>
+          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
+          <ul id="search-results"></ul>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+<script src="t.search-v1.js#this-is-an-url"></script>
+<script>
+  Search.download('t.absolutesearchdata-v1.bin#this-is-an-url');
+</script>
 </body>
 </html>
index 4e70ecc1e4ea3fbbb32a5dbcc7deb1700d6a0b19..381185f82eef1ee90ef26bdcec3a90348f5f4aa9 100644 (file)
@@ -4,7 +4,8 @@
   <meta charset="UTF-8" />
   <title>My Python Project</title>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
-  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+  <link rel="stylesheet" href="t.m-dark+documentation.compiled.css#this-is-an-url" />
+  <link rel="icon" href="t.favicon-light.png#this-is-an-url" type="image/png" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 </head>
 <body>
@@ -13,6 +14,9 @@
     <div class="m-row">
       <a href="s.index.html#this-is-an-url" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Python Project</a>
       <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
+        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+          <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+        </svg></a>
         <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
         <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
       </div>
@@ -27,6 +31,9 @@
             <li><a href="p.page.html#this-is-an-url">A page</a></li>
             <li><a href="m.link_formatting.html#this-is-an-url">A module</a></li>
             <li><a href="c.link_formatting.Class.html#this-is-an-url">The class</a></li>
+            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+              <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+            </svg></a></li>
           </ol>
         </div>
       </div>
     </div>
   </div>
 </article></main>
+<div class="m-doc-search" id="search">
+  <a href="#!" onclick="return hideSearch()"></a>
+  <div class="m-container">
+    <div class="m-row">
+      <div class="m-col-m-8 m-push-m-2">
+        <div class="m-doc-search-header m-text m-small">
+          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
+          <div id="search-symbolcount">&hellip;</div>
+        </div>
+        <div class="m-doc-search-content">
+          <form>
+            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
+          </form>
+          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
+          <div id="search-help" class="m-text m-dim m-text-center">
+            <p>blub?</p>
+          </div>
+          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
+          <ul id="search-results"></ul>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+<script src="t.search-v1.js#this-is-an-url"></script>
+<script>
+  Search.download('t.absolutesearchdata-v1.bin#this-is-an-url');
+</script>
 </body>
 </html>
index 408243fc158a8b345e571d9eb05d6ade59f2396b..774b7ae9f6e283054cfcc5d0d4068dabe4139db8 100644 (file)
@@ -4,7 +4,8 @@
   <meta charset="UTF-8" />
   <title>My Python Project</title>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
-  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+  <link rel="stylesheet" href="t.m-dark+documentation.compiled.css#this-is-an-url" />
+  <link rel="icon" href="t.favicon-light.png#this-is-an-url" type="image/png" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 </head>
 <body>
@@ -13,6 +14,9 @@
     <div class="m-row">
       <a href="s.index.html#this-is-an-url" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Python Project</a>
       <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
+        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+          <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+        </svg></a>
         <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
         <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
       </div>
@@ -27,6 +31,9 @@
             <li><a href="p.page.html#this-is-an-url">A page</a></li>
             <li><a href="m.link_formatting.html#this-is-an-url">A module</a></li>
             <li><a href="c.link_formatting.Class.html#this-is-an-url">The class</a></li>
+            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
+              <path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
+            </svg></a></li>
           </ol>
         </div>
       </div>
     </div>
   </div>
 </article></main>
+<div class="m-doc-search" id="search">
+  <a href="#!" onclick="return hideSearch()"></a>
+  <div class="m-container">
+    <div class="m-row">
+      <div class="m-col-m-8 m-push-m-2">
+        <div class="m-doc-search-header m-text m-small">
+          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
+          <div id="search-symbolcount">&hellip;</div>
+        </div>
+        <div class="m-doc-search-content">
+          <form>
+            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
+          </form>
+          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
+          <div id="search-help" class="m-text m-dim m-text-center">
+            <p>blub?</p>
+          </div>
+          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
+          <ul id="search-results"></ul>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+<script src="t.search-v1.js#this-is-an-url"></script>
+<script>
+  Search.download('t.absolutesearchdata-v1.bin#this-is-an-url');
+</script>
 </body>
 </html>
diff --git a/documentation/test_python/link_formatting/tiny.png b/documentation/test_python/link_formatting/tiny.png
new file mode 120000 (symlink)
index 0000000..79abd3c
--- /dev/null
@@ -0,0 +1 @@
+../../../plugins/m/test/images/tiny.png
\ No newline at end of file
index 7324c5ae458fc0cd35e0f056c6c16bc4890b5fda..7afaa6f0413f7fd7bfc5579a866c26b1ae98a158 100644 (file)
@@ -59,7 +59,7 @@ class Layout(BaseTestCase):
         self.assertEqual(*self.actual_expected_contents('index.html'))
         self.assertTrue(os.path.exists(os.path.join(self.path, 'output/m-dark+documentation.compiled.css')))
         self.assertTrue(os.path.exists(os.path.join(self.path, 'output/favicon-light.png')))
-        self.assertTrue(os.path.exists(os.path.join(self.path, 'output/search.js')))
+        self.assertTrue(os.path.exists(os.path.join(self.path, 'output/search-v1.js')))
         self.assertTrue(os.path.exists(os.path.join(self.path, 'output', searchdata_filename_b85)))
         self.assertTrue(os.path.exists(os.path.join(self.path, 'output/sitemap.xml')))
 
@@ -70,6 +70,7 @@ class SearchBinary(BaseTestCase):
             'SEARCH_DOWNLOAD_BINARY': True
         })
         self.assertEqual(*self.actual_expected_contents('index.html'))
+        self.assertTrue(os.path.exists(os.path.join(self.path, 'output', 'search-v1.js')))
         self.assertTrue(os.path.exists(os.path.join(self.path, 'output', searchdata_filename)))
 
 class SearchOpenSearch(BaseTestCase):
@@ -81,4 +82,5 @@ class SearchOpenSearch(BaseTestCase):
             'SEARCH_HELP': "Right-click to add a search engine."
         })
         self.assertEqual(*self.actual_expected_contents('index.html'))
+        self.assertTrue(os.path.exists(os.path.join(self.path, 'output', 'search-v1.js')))
         self.assertEqual(*self.actual_expected_contents('opensearch.xml'))
index 4623e9456496eef68d31a08a9998d084039ea470..3f92d5cbbd6ae9dbb69e48d72538cb9aec58d235 100644 (file)
@@ -29,6 +29,7 @@ from typing import List
 
 from . import BaseInspectTestCase
 from python import EntryType, default_id_formatter
+from _search import searchdata_format_version
 
 def custom_url_formatter(type: EntryType, path: List[str]) -> str:
     if type == EntryType.CLASS:
@@ -39,6 +40,17 @@ def custom_url_formatter(type: EntryType, path: List[str]) -> str:
         filename = 'p.' + '.'.join(path) + '.html'
     elif type == EntryType.SPECIAL:
         filename = 's.' + '.'.join(path) + '.html'
+    elif type == EntryType.STATIC:
+        assert len(path) == 1
+        url = os.path.basename(path[0])
+        # Encode version information into the search driver
+        if url == 'search.js':
+            url = 'search-v{}.js'.format(searchdata_format_version)
+        # Everything except the search data (which don't exist yet) should be
+        # absolute
+        if url != 'absolutesearchdata-v1.bin':
+            assert os.path.isabs(path[0]) and os.path.exists(path[0]), path[0]
+        filename = 't.' + url
     else: assert False
 
     return filename, filename + "#this-is-an-url"
@@ -66,6 +78,7 @@ class LinkFormatting(BaseInspectTestCase):
             'INPUT_PAGES': ['page.rst'],
             'URL_FORMATTER': custom_url_formatter,
             'ID_FORMATTER': custom_id_formatter,
+            'PLUGINS': ['m.images'],
             'LINKS_NAVBAR1': [
                 ('Pages', 'pages', []),
                 ('Modules', 'modules', []),
@@ -73,6 +86,10 @@ class LinkFormatting(BaseInspectTestCase):
             'LINKS_NAVBAR2': [('A page', 'page', []),
                               ('A module', 'link_formatting', []),
                               ('The class', ['link_formatting', 'Class'], [])],
+            'FAVICON': 'favicon-light.png',
+            'SEARCH_DISABLED': False, # to test search link formatting, too
+            'SEARCH_HELP': 'blub?',
+            'SEARCH_DOWNLOAD_BINARY': 'absolutesearchdata-v{}.bin'.format(searchdata_format_version),
             'PYBIND11_COMPATIBILITY': True
         })
         self.assertEqual(*self.actual_expected_contents('m.link_formatting.html'))
@@ -80,9 +97,7 @@ class LinkFormatting(BaseInspectTestCase):
         self.assertEqual(*self.actual_expected_contents('c.link_formatting.Class.html'))
         self.assertEqual(*self.actual_expected_contents('c.link_formatting.Class.Sub.html'))
 
-        # There's nothing inside p.page.html that wouldn't be already covered
-        # by others
-        self.assertTrue(os.path.exists(os.path.join(self.path, 'output/p.page.html')))
+        self.assertEqual(*self.actual_expected_contents('p.page.html'))
 
         self.assertEqual(*self.actual_expected_contents('s.classes.html'))
         self.assertEqual(*self.actual_expected_contents('s.modules.html'))
@@ -95,3 +110,10 @@ class LinkFormatting(BaseInspectTestCase):
         # Verify pybind11 overloaded function hashing as well
         self.assertEqual(*self.actual_expected_contents('m.link_formatting.pybind.html'))
         self.assertEqual(*self.actual_expected_contents('c.link_formatting.pybind.Foo.html'))
+
+        # Static data
+        self.assertTrue(os.path.exists(os.path.join(self.path, 'output/t.favicon-light.png')))
+        self.assertTrue(os.path.exists(os.path.join(self.path, 'output/t.m-dark+documentation.compiled.css')))
+        self.assertTrue(os.path.exists(os.path.join(self.path, 'output/t.search-v1.js')))
+        self.assertTrue(os.path.exists(os.path.join(self.path, 'output/t.absolutesearchdata-v1.bin')))
+        self.assertTrue(os.path.exists(os.path.join(self.path, 'output/t.tiny.png')))