Skip to main content

sphinx-affiliates

CI status License: MIT

Allow search to include documents from more than one Sphinx documentation html site.

This is useful when you have a number of github repositories under one org, are using sphinx to build documentation for all of them, and github pages to serve the artifacts. When you configure a custom domain, say https://my.site.org, for one repo in the org, any other repo's github pages (say repo2) will be visible as https://my.site.org/repo2. But the search.html from the sites will not know about eachother: they will be completely independent. This extension will solve that by

  • changing the search engine to allow loading more than one index
  • changing the search index generation process to generate an additional index
  • add configuration options to add the additional indices, from affiliate sites, to the search.html page.

To use this, install it via pip and add something like this to your conf.py

extensions = [
    'sphinx_affiliates',   # Add the extension
]

# Where this site's build is hosted, this will be the URL for all the search
# results from this site.
affiliate_options = {
    'canonical_url': "https://affiliate_search.github.io",
}

# Other sites to add to the search of this site. HTTP urls may get blocked
# as cross-site scripting
sphinx_affiliates = [
    '../other_repo1/affiliate_searchindex.js',
    'https://affiliate_search.github.io/other_repo2/affiliate_searchindex.js',
]

Release files for sphinx-affiliates 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for sphinx-affiliates 0.2.1
File Interpreter ABI Platform
sphinx_affiliates-0.2.1-py3-none-any.whl Python 3 none any Details
sphinx_affiliates-0.2.1-py2-none-any.whl Python 2 none any Details

Total release size: 20.3 kB

Release files / sphinx_affiliates-0.2.1-py3-none-any.whl

Download URL sphinx_affiliates-0.2.1-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1fd601ebce1a3dd7c5eea0b1c4cde5352e3860d4b2c9b6cc97042d9f79048a4f
BLAKE2b-256 checksum
How to use checksums
5750b7311691a23b07ea3629370c6d18ceaaa0c3cc50e98c6826b5af72a76cc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.3.post20200712 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / sphinx_affiliates-0.2.1-py2-none-any.whl

Download URL sphinx_affiliates-0.2.1-py2-none-any.whl
Size 10.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
dd5ff4bf248d83342d5db763b2798cae71a6a7b55fb9470722ee56f0328585d5
BLAKE2b-256 checksum
How to use checksums
5b622e03666db19242b1876c5aaef6b133e9b070a07604d9911fb47ba430189f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/2.7.18rc1

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

3 release files

0.1.3

3 release files

0.1.2

1 release file

0.1.0

3 release files

0.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page