Skip to content

Docsearch search #352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.12']

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.11', '3.12']

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_static/scss/components/_breadcrumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ li.wy-breadcrumbs-aside a {
line-height: 50px;
width: 100%;
position: fixed;
top: 60px;
top: 72px;
border-bottom: 1px solid var(--grey-border);
z-index:20;
background-color: white;
Expand Down
26 changes: 20 additions & 6 deletions docs/_static/scss/components/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,14 @@
}

.wy-side-nav-search {
width: 100%;
background-color: var(--primary-blue);
padding: 0;
position: fixed;
top: 0;
height: 60px;
width: 1500px;
height: 72px;
margin-left: auto;
margin-right: auto;
margin-bottom: 0;
background-color: transparent;
padding: 0;
display: grid;
grid-template-columns: 300px 1fr 300px;
justify-content: center;
Expand All @@ -168,6 +170,10 @@
}
}

a.icon {
display: flex;
}

@media (max-width: $breakpoint-laptop) {
display: grid;
grid-template-columns: 300px 1fr 300px;
Expand Down Expand Up @@ -198,7 +204,7 @@
height: calc(100vh - 60px);
overflow-y: scroll;
position: fixed;
top: 110px;
top: 122px;
padding-bottom: 60px;
padding-top: 5px;
background-color: #fff;
Expand Down Expand Up @@ -436,6 +442,14 @@


/* header*/
body > header {
background-color: var(--primary-blue);
position: fixed;
left: 0;
right: 0;
z-index: 10;
}

.wy-side-nav-search img {
background-color: transparent;
position: relative;
Expand Down
1 change: 1 addition & 0 deletions docs/_static/scss/components/_module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@use "layout";
@use "article-meta";
@use "breadcrumbs";
@use "search";

@use "../breakpoints" as *;

Expand Down
3 changes: 3 additions & 0 deletions docs/_static/scss/components/_search.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DocSearch-Button {
background: white;
}
9 changes: 6 additions & 3 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@
{%- if css|attr("rel") %}
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
{%- else %}
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
{%- if css.filename.startswith('https://') %}
<link rel="stylesheet" href="{{ css.filename }}" type="text/css" />
{%- else %}
<link rel="stylesheet" href="{{ pathto(css.filename, 1) }}" type="text/css" />
{%- endif %}
{%- endif %}
{%- endfor %}

{%- for cssfile in extra_css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor -%}
Expand Down Expand Up @@ -163,7 +166,7 @@
{%- else %}
<a href="{{ pathto(master_doc) }}" class="icon logo-title">
<img src="https://static.hypernode.com/img/logo/Hypernode-logo-diap.svg">
{{ project }}
{{ project }}
{%- endif %}

{%- if logo %}
Expand Down
9 changes: 3 additions & 6 deletions docs/_templates/searchbox.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{%- if 'singlehtml' not in builder %}
<div role="search" class="search-bar-container">
<form id="rtd-search-form" class="wy-form main-search-bar" action="{{ pathto('search') }}" method="get">
<input class="main-search-bar__input" type="text" name="q" placeholder="{{ _('Search Docs...') }}" aria-label="{{ _('Search docs') }}" />
<svg class="search-icon" version="1.1" viewBox="0 0 1000 1000" x="0px" xmlns="http://www.w3.org/2000/svg" y="0px"><path d="M968.2,849.4L667.3,549c83.9-136.5,66.7-317.4-51.7-435.6C477.1-25,252.5-25,113.9,113.4c-138.5,138.3-138.5,362.6,0,501C219.2,730.1,413.2,743,547.6,666.5l301.9,301.4c43.6,43.6,76.9,14.9,104.2-12.4C981,928.3,1011.8,893,968.2,849.4z M524.5,522c-88.9,88.7-233,88.7-321.8,0c-88.9-88.7-88.9-232.6,0-321.3c88.9-88.7,233-88.7,321.8,0C613.4,289.4,613.4,433.3,524.5,522z"></path></svg>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<div id="rtd-search-form" class="wy-form main-search-bar">
<div id="docsearch"></div>
</div>
</div>
{%- endif %}
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"hypernode.sphinx.extensions.updated_at",
"hypernode.sphinx.extensions.meta_robots",
"hypernode.sphinx.extensions.github_actions_logging",
"sphinx_docsearch",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -116,3 +117,7 @@
notfound_no_urls_prefix = True

myst_heading_anchors = 5

docsearch_app_id = "ML4HHD5658"
docsearch_api_key = "03f6d3f4f55562ca202f03baeb04b350" # Public Search API Key
docsearch_index_name = "hypernode"
19 changes: 10 additions & 9 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# docs/ requirements
sphinx==5.3.0
sphinx_rtd_theme==1.1.1
myst-parser==0.18.1
sphinx==8.3.0
sphinx_rtd_theme==3.0.2
myst-parser==4.0.1
mdit-py-plugins
sphinx-copybutton==0.5.1
mdformat==0.7.16
mdformat-myst==0.1.5
sphinx-copybutton==0.5.2
mdformat==0.7.18
mdformat-myst==0.2.1
mdformat-frontmatter==0.4.1
sphinx-notfound-page==0.8.3
sphinx-sitemap==2.4.0
GitPython==3.1.30
sphinx-notfound-page==1.1.0
sphinx-sitemap==2.6.0
sphinx-docsearch
GitPython==3.1.44

# hypernode/ requirements
beautifulsoup4==4.11.1
Expand Down
14 changes: 7 additions & 7 deletions requirements/development.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
-r base.txt

ipython==7.32.0
pre-commit==2.18.1
black==22.10.0
pytest==7.1.2
pytest-xdist==2.5.0
mypy==1.0.0
flake8==3.9.2
tox==3.25.0
pre-commit==4.1.0
black==25.1.0
pytest==8.3.5
pytest-xdist==3.6.1
mypy==1.15.0
flake8==7.1.2
tox==4.24.2
watchdog
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py37,py38,py39,py310,py311
envlist = py37,py38,py39,py310,py311,py312
skipsdist = True

[gh-actions]
Expand All @@ -9,6 +9,7 @@ python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[testenv]
setenv =
Expand Down
Loading