conf.py 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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 - 2024 ' + 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": ["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": "Yoomoney",
  76. "url": "https://yoomoney.ru/to/4100118894224342",
  77. "icon": "fas fa-donate",
  78. },
  79. ],
  80. 'search_bar_text': "Поиск...",
  81. "footer_start": ["copyright"],
  82. "footer_end": [],
  83. "switcher": {
  84. "json_url": "https://ventureo.codeberg.page/_static/switcher.json",
  85. "version_match": "latest (git)",
  86. },
  87. "navigation_with_keys": False,
  88. }
  89. html_context = {
  90. "default_mode": "light",
  91. "github_url": "https://codeberg.org",
  92. "github_user": "ventureo",
  93. "github_repo": "ARU",
  94. "github_version": "main",
  95. "doc_path": "docs",
  96. }
  97. html_sidebars = {
  98. "**": ["custom-header", "navbar-nav"]
  99. }
  100. # Misc
  101. html_copy_source = False
  102. html_show_sourcelink = False
  103. html_show_sphinx = False
  104. # Add any paths that contain custom static files (such as style sheets) here,
  105. # relative to this directory. They are copied after the builtin static files,
  106. # so a file named "default.css" will overwrite the builtin "default.css".
  107. html_static_path = ['_static']
  108. html_css_files = [
  109. 'css/theme.css',
  110. ]
  111. # -- Options for manual page output ---------------------------------------
  112. # One entry per manual page. List of tuples
  113. # (source start file, name, description, authors, manual section).
  114. man_pages = [
  115. (root_doc, 'ARU', 'Arch Linux Optimization Guide (RU)',
  116. [author], 1)
  117. ]
  118. # -- Options for LaTeX output ---------------------------------------------
  119. latex_engine = 'xelatex'
  120. latex_elements = {
  121. 'extraclassoptions': 'openany'
  122. }
  123. # Grouping the document tree into LaTeX files. List of tuples
  124. # (source start file, target name, title,
  125. # author, documentclass [howto, manual, or own class]).
  126. latex_documents = [
  127. (root_doc, 'ARU.tex', 'Arch Linux Optimization Guide (RU)',
  128. 'Arch Linux Optimization Guide (RU)', 'manual'),
  129. ]
  130. # -- Options for Texinfo output -------------------------------------------
  131. # Grouping the document tree into Texinfo files. List of tuples
  132. # (source start file, target name, title, author,
  133. # dir menu entry, description, category)
  134. texinfo_documents = [
  135. (root_doc, 'ARU', 'Arch Linux Optimization Guide (RU)',
  136. author, 'ARU', 'Arch Linux Optimization Guide (RU)',
  137. 'Miscellaneous'),
  138. ]
  139. # Documents to append as an appendix to all manuals.
  140. #
  141. # texinfo_appendices = []
  142. # If false, no module index is generated.
  143. #
  144. # texinfo_domain_indices = True
  145. # How to display URL addresses: 'footnote', 'no', or 'inline'.
  146. #
  147. # texinfo_show_urls = 'footnote'
  148. # If true, do not generate a @detailmenu in the "Top" node's menu.
  149. #
  150. # texinfo_no_detailmenu = False
  151. # If false, do not generate in manual @ref nodes.
  152. #
  153. # texinfo_cross_references = False