Skip to content
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

chore: add back sphinx theme #27

Merged
merged 9 commits into from
Apr 19, 2024
Merged
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
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,24 @@ jobs:
pip --version
poetry --version

- name: Run tests and build docs
- name: Run tests
run: |
nox -p ${{ matrix.python-version }}
env:
DOCSEARCH_APP_ID: test
DOCSEARCH_API_KEY: test
DOCSEARCH_INDEX_NAME: test

docs:
name: Docs PR preview
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: sphinx-docsearch
single-version: true
message-template: |
**Preview**: {docs-pr-index-url}
lint:
name: Lint

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ pip install sphinx-docsearch
docsearch_index_name = "<DOCSEARCH_INDEX_NAME>"
```

See also: [Configure DocSearch](https://sphinx-docsearch.readthedocs.io/en/latest/configuration.html).
See also: [Configure DocSearch](https://sphinx-docsearch.readthedocs.io/configuration.html).

## Customize

To change what the crawler should extract from your pages, see [Record Extractor](https://docsearch.algolia.com/docs/record-extractor).

You can add [custom templates](https://sphinx-docsearch.readthedocs.io/en/latest/customization.html#add-custom-templates),
if your Sphinx HTML theme uses templates [not provided](https://sphinx-docsearch.readthedocs.io/en/latest/themes.html)
You can add [custom templates](https://sphinx-docsearch.readthedocs.io/customization.html#add-custom-templates),
if your Sphinx HTML theme uses templates [not provided](https://sphinx-docsearch.readthedocs.io/themes.html)
by this extension.

You can customize the look of the DocSearch UI by [adding your own CSS](https://sphinx-docsearch.readthedocs.io/en/latest/customization.html#add-custom-css).
You can customize the look of the DocSearch UI by [adding your own CSS](https://sphinx-docsearch.readthedocs.io/customization.html#add-custom-css).
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ charset-normalizer==3.3.2 ; python_version >= "3.8" and python_version < "4.0"
click==8.1.7 ; python_version >= "3.9" and python_version < "3.13"
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and (python_version < "3.13" or sys_platform == "win32")
docutils==0.20.1 ; python_version >= "3.8" and python_version < "4.0"
exceptiongroup==1.2.0 ; python_version >= "3.9" and python_version < "3.11"
exceptiongroup==1.2.1 ; python_version >= "3.9" and python_version < "3.11"
furo==2024.1.29 ; python_version >= "3.8" and python_version < "4.0"
h11==0.14.0 ; python_version >= "3.9" and python_version < "3.13"
idna==3.7 ; python_version >= "3.8" and python_version < "4.0"
Expand Down Expand Up @@ -36,7 +36,8 @@ sphinx-autobuild==2024.4.16 ; python_version >= "3.9" and python_version < "3.13
sphinx-basic-ng==1.0.0b2 ; python_version >= "3.8" and python_version < "4.0"
sphinx-rtd-theme==2.0.0 ; python_version >= "3.8" and python_version < "4.0"
sphinx==7.1.2 ; python_version >= "3.8" and python_version < "3.9"
sphinx==7.3.6 ; python_version >= "3.9" and python_version < "4.0"
sphinx==7.2.6 ; python_version >= "3.9" and python_version < "4.0"
sphinxawesome-theme==5.1.3 ; python_version >= "3.8" and python_version < "4.0"
sphinxcontrib-applehelp==1.0.4 ; python_version >= "3.8" and python_version < "3.9"
sphinxcontrib-applehelp==1.0.8 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.8" and python_version < "3.9"
Expand All @@ -50,7 +51,6 @@ sphinxcontrib-qthelp==1.0.7 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-serializinghtml==1.1.10 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-serializinghtml==1.1.5 ; python_version >= "3.8" and python_version < "3.9"
starlette==0.37.2 ; python_version >= "3.9" and python_version < "3.13"
tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11"
tornado==6.4 ; python_version >= "3.8" and python_version < "3.9"
typing-extensions==4.11.0 ; python_version >= "3.9" and python_version < "3.11"
urllib3==2.2.1 ; python_version >= "3.8" and python_version < "4.0"
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def install_with_group(s: Session, group: str = "dev") -> None:
@session(python=python_versions)
def docs(s: Session) -> None:
"""Build the docs."""
args = ["-aWTE", "docs", "docs/_dist", "-t", "furo"]
args = ["-aWTE", "docs", "docs/_dist"]
sphinx_build = "sphinx-build"

if "--live" in s.posargs:
Expand All @@ -53,7 +53,7 @@ def docs(s: Session) -> None:
@session
def check_links(s: Session) -> None:
"""Check links in docs."""
args = ["-b", "linkcheck", "docs", "docs/_dist/_links", "-t", "furo"]
args = ["-b", "linkcheck", "docs", "docs/_dist/_links"]

if s.posargs:
args = s.posargs + args
Expand Down
77 changes: 47 additions & 30 deletions poetry.lock

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

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "sphinx-docsearch"
version = "0.0.5"
description = "A Sphinx extension for replacing the built-in search with Algolia DocSearch"
authors = ["Algolia"]
authors = ["Algolia <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [
Expand Down Expand Up @@ -36,7 +36,7 @@ python-dotenv = "^1.0.0"
furo = "^2024.1.29"
myst-parser = "^2.0.0"
sphinx_rtd_theme = "^2.0.0"
# sphinxawesome-theme = "^5.1"
sphinxawesome-theme = "^5.1"

[tool.poetry.group.dev.dependencies]
pytest = "^8"
Expand Down
Loading