Skip to content

Commit

Permalink
readthedocs: Add search ranking and use latest Python version
Browse files Browse the repository at this point in the history
Add a ranking which search results should pop up first (proposed docs/source > ema_workbench/examples > ema_workbench > everything else > all models).

See https://docs.readthedocs.io/en/stable/config-file/v2.html#search

Also always use latest stable Python version.
  • Loading branch information
EwoutH committed Apr 3, 2023
1 parent 4463a7f commit 506ff0f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand All @@ -18,6 +18,7 @@ sphinx:
# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- pdf
- htmlzip

# Optionally declare the Python requirements required to build your docs
python:
Expand All @@ -26,3 +27,16 @@ python:
path: .
extra_requirements:
- docs

# Settings for more control over Server side search.
# https://docs.readthedocs.io/en/stable/config-file/v2.html#search
search:
# Define which files pop up higher in the search results
ranking:
'docs/source/': 3
'ema_workbench/examples/*': 2
'ema_workbench/**': 1
'**/models/*': -1

# Exclude some files from the search
ignore: ['MANIFEST.in', '.gitattributes', '**/.gitignore', '**/data/*', '.eggs/**']

0 comments on commit 506ff0f

Please sign in to comment.