Skip to content

Commit

Permalink
add algolia searchbar
Browse files Browse the repository at this point in the history
Signed-off-by: Niels Bantilan <[email protected]>
  • Loading branch information
cosmicBboy committed Jan 9, 2024
1 parent 7b3f405 commit f92d008
Show file tree
Hide file tree
Showing 5 changed files with 168 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/_static/algolia-search.js
Original file line number Diff line number Diff line change
@@ -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/
},
});
23 changes: 23 additions & 0 deletions docs/_static/algolia.css
Original file line number Diff line number Diff line change
@@ -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;
}
126 changes: 126 additions & 0 deletions docs/_templates/base.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions docs/_templates/search.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@
# 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"]
html_js_files = ["algolia-search.js"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down

0 comments on commit f92d008

Please sign in to comment.