conf.py 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. # Configuration file for the Sphinx documentation builder.
  2. #
  3. # This file only contains a selection of the most common options. For a full
  4. # list see the documentation:
  5. # https://www.sphinx-doc.org/en/master/usage/configuration.html
  6. # -- Path setup --------------------------------------------------------------
  7. # If extensions (or modules to document with autodoc) are in another directory,
  8. # add these directories to sys.path here. If the directory is relative to the
  9. # documentation root, use os.path.abspath to make it absolute, like shown here.
  10. #
  11. # import os
  12. # import sys
  13. # sys.path.insert(0, os.path.abspath('.'))
  14. # -- Project information -----------------------------------------------------
  15. project = 'ARU — Руководство по оптимизации Arch Linux'
  16. author = 'Pavel Priluckiy, Vasiliy Stelmachenok and contributors'
  17. copyright = 'ARU 2018 - 2025 ' + author
  18. # The full version, including alpha/beta/rc tags
  19. release = '2024.07.21'
  20. # -- General configuration ---------------------------------------------------
  21. # Add any Sphinx extension module names here, as strings. They can be
  22. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  23. # ones.
  24. extensions = ['sphinx.ext.githubpages', 'sphinx_copybutton', 'sphinx_design']
  25. master_doc = 'index'
  26. root_doc = master_doc
  27. source_suffix = { '.rst': 'restructuredtext' }
  28. # Fixes:
  29. # https://codeberg.org/ventureo/ARU/issues/3
  30. # https://codeberg.org/ventureo/ARU/pulls/4
  31. smartquotes = False
  32. highlight_language = 'shell'
  33. # Add any paths that contain templates here, relative to this directory.
  34. templates_path = ['_template']
  35. # The language for content autogenerated by Sphinx. Refer to documentation
  36. # for a list of supported languages.
  37. #
  38. # This is also used if you do content translation via gettext catalogs.
  39. # Usually you set "language" from the command line for these cases.
  40. language = 'ru'
  41. # List of patterns, relative to source directory, that match files and
  42. # directories to ignore when looking for source files.
  43. # This pattern also affects html_static_path and html_extra_path.
  44. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  45. # The name of the Pygments (syntax highlighting) style to use.
  46. pygments_style = "sphinx"
  47. # -- Options for HTML output -------------------------------------------------
  48. # The theme to use for HTML and HTML Help pages. See the documentation for
  49. # a list of builtin themes.
  50. #
  51. html_theme = 'pydata_sphinx_theme'
  52. html_title = project
  53. html_short_title = "ARU"
  54. html_theme_options = {
  55. "header_links_before_dropdown": 9999,
  56. "navbar_align": "content",
  57. "navbar_start": [],
  58. "navbar_center": ["navbar-logo", "version-switcher"],
  59. "navbar_end": ["theme-switcher", "navbar-icon-links"],
  60. # Edit button disabled after migrating from GitHub
  61. "use_edit_page_button": False,
  62. "secondary_sidebar_items": ["page-toc"],
  63. "icon_links": [
  64. {
  65. "name": "Codeberg",
  66. "url": "https://codeberg.org/ventureo/ARU",
  67. "icon": "fab fa-git-alt",
  68. },
  69. {
  70. "name": "Matrix",
  71. "url": "https://matrix.to/#/#linux_bunker:matrix.org",
  72. "icon": "fas fa-comments",
  73. },
  74. {
  75. "name": "GitHub (mirror)",
  76. "url": "https://github.com/ventureoo/ARU",
  77. "icon": "fa-brands fa-github",
  78. },
  79. {
  80. "name": "Yoomoney",
  81. "url": "https://yoomoney.ru/to/4100118894224342",
  82. "icon": "fas fa-donate",
  83. },
  84. ],
  85. 'search_bar_text': "Поиск...",
  86. "footer_start": ["copyright"],
  87. "footer_end": [],
  88. "switcher": {
  89. "json_url": "https://ventureo.codeberg.page/_static/switcher.json",
  90. "version_match": "latest (git)",
  91. },
  92. "navigation_with_keys": False,
  93. }
  94. html_context = {
  95. "default_mode": "light",
  96. "github_url": "https://codeberg.org",
  97. "github_user": "ventureo",
  98. "github_repo": "ARU",
  99. "github_version": "main",
  100. "doc_path": "docs",
  101. }
  102. html_sidebars = {
  103. "source/*": ["sidebar-nav-bs", "custom-header"]
  104. }
  105. # Misc
  106. html_copy_source = False
  107. html_show_sourcelink = False
  108. html_show_sphinx = False
  109. # Add any paths that contain custom static files (such as style sheets) here,
  110. # relative to this directory. They are copied after the builtin static files,
  111. # so a file named "default.css" will overwrite the builtin "default.css".
  112. html_static_path = ['_static']
  113. html_css_files = [
  114. 'css/theme.css',
  115. ]
  116. html_js_files = [
  117. 'js/custom.js'
  118. ]
  119. # -- Options for manual page output ---------------------------------------
  120. # One entry per manual page. List of tuples
  121. # (source start file, name, description, authors, manual section).
  122. man_pages = [
  123. (root_doc, 'ARU', 'Arch Linux Optimization Guide (RU)',
  124. [author], 1)
  125. ]
  126. # -- Options for LaTeX output ---------------------------------------------
  127. latex_engine = 'xelatex'
  128. latex_elements = {
  129. 'extraclassoptions': 'openany'
  130. }
  131. # Grouping the document tree into LaTeX files. List of tuples
  132. # (source start file, target name, title,
  133. # author, documentclass [howto, manual, or own class]).
  134. latex_documents = [
  135. (root_doc, 'ARU.tex', 'Arch Linux Optimization Guide (RU)',
  136. 'Arch Linux Optimization Guide (RU)', 'manual'),
  137. ]
  138. # -- Options for Texinfo output -------------------------------------------
  139. # Grouping the document tree into Texinfo files. List of tuples
  140. # (source start file, target name, title, author,
  141. # dir menu entry, description, category)
  142. texinfo_documents = [
  143. (root_doc, 'ARU', 'Arch Linux Optimization Guide (RU)',
  144. author, 'ARU', 'Arch Linux Optimization Guide (RU)',
  145. 'Miscellaneous'),
  146. ]
  147. # Documents to append as an appendix to all manuals.
  148. #
  149. # texinfo_appendices = []
  150. # If false, no module index is generated.
  151. #
  152. # texinfo_domain_indices = True
  153. # How to display URL addresses: 'footnote', 'no', or 'inline'.
  154. #
  155. # texinfo_show_urls = 'footnote'
  156. # If true, do not generate a @detailmenu in the "Top" node's menu.
  157. #
  158. # texinfo_no_detailmenu = False
  159. # If false, do not generate in manual @ref nodes.
  160. #
  161. # texinfo_cross_references = False