Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattip/sphinx-affiliates
Sphinx extension to search affiliated sphinx-built websites
https://github.com/mattip/sphinx-affiliates
Last synced: 11 days ago
JSON representation
Sphinx extension to search affiliated sphinx-built websites
- Host: GitHub
- URL: https://github.com/mattip/sphinx-affiliates
- Owner: mattip
- License: mit
- Created: 2020-09-05T21:36:10.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-12T11:43:46.000Z (about 2 years ago)
- Last Synced: 2024-10-07T11:45:52.363Z (about 1 month ago)
- Language: JavaScript
- Size: 35.2 KB
- Stars: 3
- Watchers: 5
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# sphinx-affiliates
[![CI status](https://github.com/mattip/sphinx-affiliates/workflows/Tests/badge.svg)](https://github.com/mattip/sphinx-affiliates/actions)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)Allow search to include documents from more than one [Sphinx
documentation](http://www.sphinx-doc.org) 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](https://pages.github.com/) to serve the artifacts. When you configure
a [custom domain](https://docs.github.com/en/github/working-with-github-pages/about-custom-domains-and-github-pages),
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
sphinx_affiliates = [
'https://abc.com/affiliate_searchindex.js',
'https://def.com/affiliate_searchindex.js',
]
```