pyrogram/docs/source/conf.py

82 lines
2.0 KiB
Python
Raw Normal View History

2019-05-23 16:59:29 +00:00
# Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2019 Dan Tès <https://github.com/delivrance>
2017-12-30 18:47:18 +00:00
#
2019-05-23 16:59:29 +00:00
# This file is part of Pyrogram.
2017-12-30 18:47:18 +00:00
#
2019-05-23 16:59:29 +00:00
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
2017-12-30 18:47:18 +00:00
#
2019-05-23 16:59:29 +00:00
# Pyrogram is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
2017-12-30 18:47:18 +00:00
#
2019-05-23 16:59:29 +00:00
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
2017-12-30 18:47:18 +00:00
import os
import sys
2019-05-23 16:59:29 +00:00
sys.path.insert(0, os.path.abspath("../.."))
2017-12-30 18:47:18 +00:00
2018-04-15 18:56:06 +00:00
from pyrogram import __version__
2017-12-30 18:47:18 +00:00
2019-04-12 13:52:06 +00:00
from pygments.styles.friendly import FriendlyStyle
FriendlyStyle.background_color = "#f3f2f1"
2019-05-23 16:59:29 +00:00
project = "Pyrogram"
copyright = "2017-2019, Dan"
author = "Dan"
2017-12-30 18:47:18 +00:00
extensions = [
2019-05-23 16:59:29 +00:00
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.autosummary",
"sphinx_copybutton"
2017-12-30 18:47:18 +00:00
]
2019-05-23 16:59:29 +00:00
master_doc = "index"
source_suffix = ".rst"
autodoc_member_order = "bysource"
2017-12-30 18:47:18 +00:00
2019-05-23 16:59:29 +00:00
version = __version__
2018-04-15 18:56:06 +00:00
release = version
2017-12-30 18:47:18 +00:00
2019-05-23 16:59:29 +00:00
templates_path = ["_templates"]
2017-12-30 18:47:18 +00:00
2019-05-23 16:59:29 +00:00
napoleon_use_rtype = False
2017-12-30 18:47:18 +00:00
2019-05-23 16:59:29 +00:00
pygments_style = "friendly"
2017-12-30 18:47:18 +00:00
2018-01-15 11:36:03 +00:00
html_title = "Pyrogram Documentation"
2019-05-23 16:59:29 +00:00
html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
html_show_sourcelink = True
2018-01-08 04:17:55 +00:00
html_show_copyright = False
html_theme_options = {
2019-05-23 16:59:29 +00:00
"canonical_url": "https://docs.pyrogram.org/",
"collapse_navigation": True,
"sticky_navigation": False,
2019-05-23 16:59:29 +00:00
"logo_only": True,
2019-05-28 14:41:55 +00:00
"display_version": True,
"style_external_links": True
2017-12-30 18:47:18 +00:00
}
2019-05-23 16:59:29 +00:00
html_logo = "_images/pyrogram.png"
html_favicon = "_images/favicon.ico"
2019-06-22 23:31:18 +00:00
latex_engine = "xelatex"
latex_logo = "_images/pyrogram.png"
latex_elements = {
"pointsize": "12pt",
"fontpkg": r"""
2019-08-17 11:12:13 +00:00
\setmainfont{Open Sans}
\setsansfont{Bitter}
2019-06-22 23:31:18 +00:00
\setmonofont{Ubuntu Mono}
"""
}