Skip to content
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/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
python-version: "3.14"

- name: Get full Python version
id: full-python-version
Expand Down
26 changes: 21 additions & 5 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# https://docs.readthedocs.io/en/stable/config-file/v2.html
#
# Pipeline: builds the docs (MkDocs Material), then runs Pagefind over the
# output and copies docs/manifest.json next to it. The published artifact is
# consumed by the python-openapi.org website shell, which proxies docs paths
# from the shell origin to RTD and merges the per-project Pagefind bundles
# in the browser at search time. See ../web/specs/001-openapi-website for
# the website plan and the docs-theme-contract.md.
version: 2

# Build documentation with Mkdocs
mkdocs:
configuration: mkdocs.yml
configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all
# HTML only — the website shell consumes HTML + manifest + Pagefind. PDF/ePub
# builds are not supported by the current MkDocs plugin set.
formats: []

build:
os: ubuntu-24.04
tools:
python: "3.12"
nodejs: "20"
jobs:
post_system_dependencies:
- asdf plugin-add poetry
- asdf install poetry 2.2.1
- asdf global poetry 2.2.1
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --no-interaction --with docs
# Replaces RTD's declarative MkDocs output: `make docs-publish` rebuilds
# the docs into docs_build/, runs Pagefind into docs_build/pagefind/, and
# copies docs/manifest.json into docs_build/. We then move docs_build/*
# into $READTHEDOCS_OUTPUT/html/ so the published artifact contains both
# the manifest and the Pagefind bundle expected by the website shell.
post_build:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry run make docs-publish
- mkdir -p $READTHEDOCS_OUTPUT/html && cp -r docs_build/* $READTHEDOCS_OUTPUT/html/
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ test-cleanup: test-cache-cleanup reports-cleanup
docs-html:
python -m mkdocs build --clean --site-dir docs_build --config-file mkdocs.yml

docs-pagefind: docs-html
@npx --yes pagefind --site docs_build

docs-manifest:
@cp docs/manifest.json docs_build/manifest.json

docs-publish: docs-html docs-pagefind docs-manifest

docs-cleanup:
@rm -rf docs_build

Expand Down
25 changes: 25 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"manifestVersion": 1,
"projectSlug": "openapi-core",
"displayName": "openapi-core",
"themeContractVersion": 1,
"latestStableVersion": "latest",
"routes": {
"publicProjectPath": "/openapi-core",
"latestDocsPath": "/openapi-core/docs/",
"versionedDocsPrefix": "/openapi-core/docs/"
},
"versions": [
{
"version": "latest",
"label": "latest",
"channel": "stable",
"isLatestStable": true,
"publicBasePath": "/openapi-core/docs/latest/",
"originUrl": "https://openapi-core.readthedocs.io/en/latest/",
"sitemapUrl": "https://openapi-core.readthedocs.io/en/latest/sitemap.xml",
"searchBundleUrl": "https://openapi-core.readthedocs.io/en/latest/pagefind/",
"publishedAt": "2026-05-03T00:00:00Z"
}
]
}
29 changes: 29 additions & 0 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% extends "base.html" %}

{#
Shell-aware override for the Python OpenAPI website.
Theme contract: docs-theme-contract.md (themeContractVersion 1).
#}

{% block site_meta %}
{{ super() }}
<meta name="ecosystem-shell" content="Python OpenAPI Ecosystem" />
<meta name="ecosystem-project" content="openapi-core" />
<meta data-theme-contract-version="1" />
{% endblock %}

{% block announce %}
<aside class="ecosystem-shell-banner" aria-label="Python OpenAPI Ecosystem">
<a class="ecosystem-home" href="/" data-ecosystem-home="true">
← Back to the Python OpenAPI
</a>
<span class="ecosystem-project-label" aria-current="page">openapi-core</span>
</aside>
{% endblock %}

{% block footer %}
{{ super() }}
<p class="ecosystem-footer-note" data-theme-contract-version="1">
Part of the <a href="/" class="ecosystem-home">Python OpenAPI Ecosystem</a>.
</p>
{% endblock %}
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
site_name: OpenAPI-core
site_description: OpenAPI for Python
site_url: https://openapi-core.readthedocs.io/
site_url: https://python-openapi.org/openapi-core/docs/latest/
theme:
name: material
custom_dir: docs/overrides
icon:
repo: fontawesome/brands/github-alt
palette:
Expand Down
Loading