diff --git a/docs/_static/algolia-search.js b/docs/_static/algolia-search.js new file mode 100644 index 0000000000..34789e97e8 --- /dev/null +++ b/docs/_static/algolia-search.js @@ -0,0 +1,12 @@ +/*global docsearch*/ + +docsearch({ + container: ".docsearch", + appId: "WLG0MZB58Q", + apiKey: "28bf9bfd4a77a7d6b3ab7e98c671e781", + indexName: "flyte", + searchParameters: { + hitsPerPage: 10, + // See https://www.algolia.com/doc/api-reference/api-parameters/ + }, +}); diff --git a/docs/_static/algolia.css b/docs/_static/algolia.css new file mode 100644 index 0000000000..c051ed6197 --- /dev/null +++ b/docs/_static/algolia.css @@ -0,0 +1,23 @@ +/* Algolia Docs Search Style */ +.docsearch { + width: 100% !important; +} + +.DocSearch-Button { + height: 60px !important; + width: 100% !important; + margin: 0px !important; + border-radius: 0 !important; + border-bottom: 1px solid var(--color-header-border) !important; + background: var(--color-sidebar-background) !important; + padding: 0 15px !important; +} + +.DocSearch-Button:hover, .DocSearch-Button:active { + box-shadow: none !important; + background: var(--docsearch-searchbox-background) !important; +} + +.sidebar-search-container::before { + content: none; +} diff --git a/docs/_static/flyte.css b/docs/_static/flyte.css index a0e5225c25..6071b8ab51 100644 --- a/docs/_static/flyte.css +++ b/docs/_static/flyte.css @@ -43,6 +43,7 @@ h6 { width: 100% !important; margin: 0px !important; border-radius: 0 !important; + border-top: 1px solid var(--color-header-border) !important; border-bottom: 1px solid var(--color-header-border) !important; background: var(--color-sidebar-background) !important; padding: 0 15px !important; @@ -53,6 +54,16 @@ h6 { background: var(--docsearch-searchbox-background) !important; } +.DocSearch-Button-Key { + border-radius: 3px !important; + box-shadow: var(--docsearch-key-shadow) !important; + color: var(--docsearch-muted-color) !important; + display: flex !important; + margin-right: 0.4em !important; + padding: 0 0 2px !important; + border: 0 !important; +} + .sidebar-search-container::before { content: none; } diff --git a/docs/_templates/base.html b/docs/_templates/base.html new file mode 100644 index 0000000000..f3c5ef1a49 --- /dev/null +++ b/docs/_templates/base.html @@ -0,0 +1,125 @@ + + + + {%- block site_meta -%} + + + + + {%- if metatags %}{{ metatags }}{% endif -%} + + {%- block linktags %} + {%- if hasdoc('about') -%} + + {%- endif -%} + {%- if hasdoc('genindex') -%} + + {%- endif -%} + {%- if hasdoc('search') -%} + + {%- endif -%} + {%- if hasdoc('copyright') -%} + + {%- endif -%} + {%- if next -%} + + {%- endif -%} + {%- if prev -%} + + {%- endif -%} + {#- rel="canonical" (set by html_baseurl) -#} + {%- if pageurl %} + + {%- endif %} + {%- endblock linktags %} + + {# Favicon #} + {%- if favicon_url -%} + + {%- endif -%} + + {#- Generator banner -#} + + + {%- endblock site_meta -%} + + {#- Site title -#} + {%- block htmltitle -%} + {% if not docstitle %} + {{ title|striptags|e }} + {% elif pagename == master_doc %} + {{ docstitle|striptags|e }} + {% else %} + {{ title|striptags|e }} - {{ docstitle|striptags|e }} + {% endif %} + {%- endblock -%} + + {%- block styles -%} + + {# Custom stylesheets #} + {%- block regular_styles -%} + {%- for css in css_files -%} + {% if css|attr("filename") -%} + {{ css_tag(css) }} + {%- else -%} + + {%- endif %} + {% endfor -%} + {%- endblock regular_styles -%} + + {#- Theme-related stylesheets -#} + {%- block theme_styles %} + {% include "partials/_head_css_variables.html" with context %} + {%- endblock theme_styles -%} + + {%- block extra_styles -%} + + + {%- endblock extra_styles -%} + + {%- endblock styles -%} + + {#- Custom front matter #} + {%- block extrahead -%}{%- endblock -%} + + + + + + {% block body %} + + {% endblock %} + + {%- block scripts -%} + + {# Custom JS #} + {%- block regular_scripts -%} + {% for path in script_files -%} + {{ js_tag(path) }} + {% endfor -%} + {%- endblock regular_scripts -%} + + {# Theme-related JavaScript code #} + {%- block theme_scripts -%} + + + {%- endblock -%} + {%- endblock scripts -%} + + diff --git a/docs/_templates/page.html b/docs/_templates/page.html index 582062c95e..d078e9dd5e 100644 --- a/docs/_templates/page.html +++ b/docs/_templates/page.html @@ -61,6 +61,8 @@
+ + diff --git a/docs/_templates/sidebar/search.html b/docs/_templates/sidebar/search.html new file mode 100644 index 0000000000..a6bfc08dd9 --- /dev/null +++ b/docs/_templates/sidebar/search.html @@ -0,0 +1,5 @@ +
+ + + diff --git a/docs/conf.py b/docs/conf.py index f1ac1cb684..ed9df55433 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -186,7 +186,7 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] -html_css_files = ["custom.css", "flyte.css"] +html_css_files = ["custom.css", "flyte.css", "algolia.css"] # Custom sidebar templates, must be a dictionary that maps document names # to template names.