conf.py 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. # -*- coding: utf-8 -*-
  2. #
  3. # SPDX-FileCopyrightText: 2018-2023 EasyCoding Team and contributors
  4. #
  5. # SPDX-License-Identifier: CC-BY-SA-4.0
  6. #
  7. # All configuration values have a default; values that are commented out
  8. # serve to show the default.
  9. # Importing some Python modules.
  10. from os import getenv
  11. from time import strftime
  12. # Configuring static version for the packaged builds.
  13. rel_version = '2023.05.30'
  14. # -- General configuration ------------------------------------------------
  15. # If your documentation needs a minimal Sphinx version, state it here.
  16. #
  17. needs_sphinx = '1.6'
  18. keep_warnings = False
  19. # Add any Sphinx extension module names here, as strings. They can be
  20. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  21. # ones.
  22. extensions = ['sphinx.ext.ifconfig',
  23. 'sphinx.ext.githubpages']
  24. # Add any paths that contain templates here, relative to this directory.
  25. templates_path = ['_templates']
  26. # The suffix(es) of source filenames.
  27. # You can specify multiple suffix as a list of string:
  28. #
  29. # source_suffix = ['.rst', '.md']
  30. source_suffix = '.rst'
  31. # The master toctree document.
  32. master_doc = 'index'
  33. # General information about the project.
  34. project = 'Неофициальный FAQ по Fedora'
  35. copyright = '2018 - {}, EasyCoding Team and contributors'.format(strftime('%Y'))
  36. author = 'EasyCoding Team and contributors'
  37. # The version info for the project you're documenting, acts as replacement for
  38. # |version| and |release|, also used in various other places throughout the
  39. # built documents.
  40. #
  41. # The short X.Y version.
  42. version = strftime('%Y.%m.%d') if getenv('CI_ACTION') else rel_version
  43. # The full version, including alpha/beta/rc tags.
  44. release = version
  45. # The language for content autogenerated by Sphinx. Refer to documentation
  46. # for a list of supported languages.
  47. #
  48. # This is also used if you do content translation via gettext catalogs.
  49. # Usually you set "language" from the command line for these cases.
  50. language = 'ru'
  51. # List of patterns, relative to source directory, that match files and
  52. # directories to ignore when looking for source files.
  53. # This patterns also effect to html_static_path and html_extra_path
  54. exclude_patterns = ['Thumbs.db', '.DS_Store']
  55. # The name of the Pygments (syntax highlighting) style to use.
  56. pygments_style = 'sphinx'
  57. # If true, `todo` and `todoList` produce output, else they produce nothing.
  58. todo_include_todos = False
  59. # -- Options for HTML output ----------------------------------------------
  60. # Load CSS files for the custom search engine.
  61. html_css_files = [
  62. 'https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css'
  63. ]
  64. # Load JavaScript files for the custom search engine.
  65. html_js_files = [
  66. ('https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js', {'defer': 'defer'}),
  67. ('search.js', {'defer': 'defer'})
  68. ]
  69. # The theme to use for HTML and HTML Help pages. See the documentation for
  70. # a list of builtin themes.
  71. #
  72. html_theme = 'alabaster'
  73. # Theme options are theme-specific and customize the look and feel of a theme
  74. # further. For a list of options available for each theme, see the
  75. # documentation.
  76. #
  77. html_theme_options = {
  78. 'font_family': 'sans-serif',
  79. 'head_font_family': 'serif',
  80. 'font_size': '16px',
  81. 'show_powered_by': False,
  82. 'github_user': 'RussianFedora',
  83. 'github_repo': 'FAQ',
  84. 'github_banner': 'forkme_right_green.png',
  85. 'github_button': False,
  86. 'logo': 'faq-icon.png',
  87. 'touch_icon': 'faq-icon.png',
  88. 'logo_name': False
  89. }
  90. # Override default HTML title for HTML and HTML Help pages.
  91. html_title = '{} (версия {})'.format(project, version)
  92. # Add any paths that contain custom static files (such as style sheets) here,
  93. # relative to this directory. They are copied after the builtin static files,
  94. # so a file named "default.css" will overwrite the builtin "default.css".
  95. html_static_path = ['_static']
  96. # Custom sidebar templates, must be a dictionary that maps document names
  97. # to template names.
  98. #
  99. # This is required for the alabaster theme
  100. # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
  101. html_sidebars = {
  102. '**': [
  103. 'searchbox.html',
  104. 'navigation.html',
  105. 'relations.html'
  106. ]
  107. }
  108. # Add favicon for generated HTML pages.
  109. html_favicon = '_static/faq-icon.ico'
  110. # Other HTML options
  111. html_copy_source = False
  112. html_show_sourcelink = False
  113. html_show_sphinx = False
  114. # -- Options for HTMLHelp output ------------------------------------------
  115. # Output file base name for HTML help builder.
  116. htmlhelp_basename = 'fedora-faq-ru'
  117. # -- Options for LaTeX output ---------------------------------------------
  118. # For additional options see: https://www.sphinx-doc.org/en/master/latex.html
  119. latex_engine = 'xelatex'
  120. latex_elements = {
  121. 'fontpkg': r'''
  122. \setmainfont{DejaVu Serif}
  123. \setromanfont{DejaVu Sans}
  124. \setsansfont{DejaVu Sans}
  125. \setmonofont{DejaVu Sans Mono}
  126. ''',
  127. 'preamble': r'''
  128. \makeatletter
  129. \renewcommand{\sphinxtableofcontentshook}{%
  130. \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{3.2em}}%
  131. }
  132. \makeatother
  133. '''
  134. }
  135. # Grouping the document tree into LaTeX files. List of tuples
  136. # (source start file, target name, title,
  137. # author, documentclass [howto, manual, or own class]).
  138. latex_documents = [
  139. (master_doc, 'fedora-faq-ru.tex', 'Неофициальный FAQ по Fedora',
  140. 'EasyCoding Team and contributors', 'manual'),
  141. ]
  142. # -- Options for manual page output ---------------------------------------
  143. # One entry per manual page. List of tuples
  144. # (source start file, name, description, authors, manual section).
  145. man_pages = [
  146. (master_doc, 'fedora-faq-ru', 'Неофициальный FAQ по Fedora',
  147. [author], 1)
  148. ]
  149. # -- Options for Texinfo output -------------------------------------------
  150. # Grouping the document tree into Texinfo files. List of tuples
  151. # (source start file, target name, title, author,
  152. # dir menu entry, description, category)
  153. texinfo_documents = [
  154. (master_doc, 'fedora-faq-ru', 'Неофициальный FAQ по Fedora',
  155. author, 'fedora-faq-ru', 'Неофициальный FAQ по Fedora на русском языке.',
  156. 'Miscellaneous'),
  157. ]