Расширение для Sphinx для создания flyout-меню
Project description
sphinx-flyout
sphinx-flyout - это расширение Sphinx для автоматической генерации flyout-меню
Использование
Установка
pip install git+https://github.com/irsural/sphinx-flyout@master
Расширение добавляется в файл конфигурации sphinx (conf.py), так же как и другие расширения sphinx:
extensions = [
...,
'sphinx_flyout',
...
]
Настройка
У расширения есть 7 параметров, задаваемых переменными в conf.py.
sphinx_flyout_header
Заголовок меню. По умолчанию - название проекта Sphinx
sphinx_flyout_git_reference
Название версии git-репозитория. По умолчанию - текущая ветка
sphinx_flyout_repository_link
Строка со ссылкой на репозиторий проекта. По умолчанию пустая, а раздел Репозиторий не отображается
sphinx_flyout_host
Ссылка на хостинг сайта. Автоматически вставляется в нижеупомянутые ссылки. Обязательный параметр
sphinx_flyout_downloads
Список с форматами документации проекта, доступными для загрузки
(html, pdf и т.д.) .
Во время работы расширения ссылки автоматически преобразуются в следующий формат:
html: sphinx_flyout_host / sphinx_flyout_header / download / html
По умолчанию пуст, а раздел Загрузки не отображается
sphinx_flyout_branches
Список с названиями собранных веток проекта.
Во время работы расширения ссылки автоматически преобразуются в следующий формат:
ветка1: sphinx_flyout_host / sphinx_flyout_header / branch / ветка1
По умолчанию пуст, а раздел Ветки не отображается
sphinx_flyout_tags
Список с названиями собранных тэгов проекта.
Во время работы расширения ссылки автоматически преобразуются в следующий формат:
тэг1: sphinx_flyout_host / sphinx_flyout_header / tag / тэг1
По умолчанию пуст, а раздел Тэги не отображается
Пример
Содержимое conf.py:
sphinx_flyout_header = "My project"
sphinx_flyout_repository_link = "https://gitea.example.com/my/project"
sphinx_flyout_host = "https://example.com"
sphinx_flyout_downloads = ["html", "pdf"]
sphinx_flyout_tags = ["t2", "release"]
sphinx_flyout_branches = ["b1", "master"]
Вид сгенерированного меню:
Ссылки Ветки ведут на https://example.com/My%20project/branch/b1 и https://example.com/My%20project/branch/master
Ссылки Тэги ведут на https://example.com/My%20project/tag/t2 и https://example.com/My%20project/tag/release
Ссылки Загрузки ведут на https://example.com/My%20project/download/html и https://example.com/My%20project/download/pdf
Ссылка Посмотреть ведёт на https://gitea.example.com/my/project
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx-flyout-0.1.tar.gz.
File metadata
- Download URL: sphinx-flyout-0.1.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5802cfb1dfeb6180409e3974c8fb4425dcca87c3b387501582d02e623461c2f
|
|
| MD5 |
967458b6770602c9ba499bf46615d843
|
|
| BLAKE2b-256 |
1d32022b6b0f39bc9d3bea3a00eeac1b8bd1c4bb37ba19a6e5a30f578f74bea9
|
File details
Details for the file sphinx_flyout-0.1-py3-none-any.whl.
File metadata
- Download URL: sphinx_flyout-0.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
239b3b21e73a55a1a3f371405b3849822f29df6e9caf8a390e8c429fb3475394
|
|
| MD5 |
19f8f7e2a0e8769931330536bc59ad66
|
|
| BLAKE2b-256 |
c5863decff191f724724536614656cb63d7aeca57e45fa4962dbcb1ddf044484
|