conf.py 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. # -*- coding: utf-8 -*-
  2. #
  3. # GeoServer documentation build configuration file, created by
  4. # sphinx-quickstart on Tue Oct 28 10:01:09 2008.
  5. #
  6. # This file is execfile()d with the current directory set to its containing dir.
  7. #
  8. # The contents of this file are pickled, so don't put values in the namespace
  9. # that aren't pickleable (module imports are okay, they're removed automatically).
  10. #
  11. # All configuration values have a default value; values that are commented out
  12. # serve to show the default value.
  13. import sys, os, string
  14. import datetime
  15. # If your extensions are in another directory, add it here. If the directory
  16. # is relative to the documentation root, use os.path.abspath to make it
  17. # absolute, like shown here.
  18. #sys.path.append(os.path.abspath('some/directory'))
  19. now = datetime.datetime.now()
  20. # General configuration
  21. # ---------------------
  22. # Add any Sphinx extension module names here, as strings. They can be extensions
  23. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
  24. extensions = ['sphinx.ext.todo', 'sphinx.ext.extlinks']
  25. #todo_include_todos = True
  26. # Add any paths that contain templates here, relative to this directory.
  27. #templates_path = ['../../theme/_templates']
  28. # The suffix of source filenames.
  29. source_suffix = '.rst'
  30. # The master toctree document.
  31. master_doc = 'index'
  32. # General substitutions.
  33. project = u'GeoServer'
  34. manual = u'用户手册'
  35. copyright = u'{}, Open Source Geospatial Foundation'.format(now.year)
  36. # The default replacements for |version| and |release|, also used in various
  37. # other places throughout the built documents.
  38. #
  39. # The short X.Y version.
  40. version = '2.20'
  41. # The full version, including alpha/beta/rc tags.
  42. release = '2.20-SNAPSHOT'
  43. # Used in build and documentation links
  44. branch = 'main'
  45. # Users don't need to see the "SNAPSHOT" notation when it's there
  46. if release.find('SNAPSHOT') != -1:
  47. release = '2.20.x'
  48. download_release = 'https://build.geoserver.org/geoserver/'+branch+'/geoserver-'+version+'.x-latest-%s.zip'
  49. download_extension = 'https://build.geoserver.org/geoserver/'+branch+'/ext-latest/geoserver-'+version+'-SNAPSHOT-%s-plugin.zip'
  50. download_community = 'https://build.geoserver.org/geoserver/'+branch+'/community-latest/geoserver-'+version+'-SNAPSHOT-%s-plugin.zip'
  51. else:
  52. download_release = 'http://sourceforge.net/projects/geoserver/files/GeoServer/'+release+'/geoserver-'+release+'-%s.zip'
  53. download_extension = 'http://sourceforge.net/projects/geoserver/files/GeoServer/'+release+'/extensions/geoserver-'+release+'-%s-plugin.zip'
  54. download_community = 'https://build.geoserver.org/geoserver/'+branch+'/community-latest/geoserver-'+version+'.x-SNAPSHOT-%s-plugin.zip'
  55. # There are two options for replacing |today|: either, you set today to some
  56. # non-false value, then it is used:
  57. #today = ''
  58. # Else, today_fmt is used as the format for a strftime call.
  59. today_fmt = '%B %d, %Y'
  60. # List of documents that shouldn't be included in the build.
  61. #unused_docs = []
  62. # List of directories, relative to source directories, that shouldn't be searched
  63. # for source files.
  64. exclude_trees = []
  65. # The reST default role (used for this markup: `text`) to use for all documents.
  66. #default_role = None
  67. # If true, '()' will be appended to :func: etc. cross-reference text.
  68. #add_function_parentheses = True
  69. # If true, the current module name will be prepended to all description
  70. # unit titles (such as .. function::).
  71. #add_module_names = True
  72. # If true, sectionauthor and moduleauthor directives will be shown in the
  73. # output. They are ignored by default.
  74. #show_authors = False
  75. # The name of the Pygments (syntax highlighting) style to use.
  76. pygments_style = 'sphinx'
  77. # Options for extlinks
  78. #
  79. # :website:`license <License>`
  80. # :geos:`1234`
  81. # :wiki:`Proposals`
  82. # -----------------------------------
  83. extlinks = {
  84. 'wiki': ('https://github.com/geoserver/geoserver/wiki/%s', None),
  85. 'website': ('http://geoserver.org/%s', None),
  86. 'user': ('http://docs.geoserver.org/'+branch+'/en/user/%s', None),
  87. 'developer': ('http://docs.geoserver.org/latest/en/developer/%s', None),
  88. 'docguide': ('http://docs.geoserver.org/latest/en/docguide/%s', None),
  89. 'geos': ('https://osgeo-org.atlassian.net/browse/GEOS-%s','GEOS-%s'),
  90. 'geot': ('https://osgeo-org.atlassian.net/browse/GEOT-%s','GEOT-%s'),
  91. 'api': ('http://docs.geoserver.org/latest/en/api/#1.0.0/%s', None),
  92. 'geotools': ('https://docs.geotools.org/latest/userguide/%s', None),
  93. 'download_release': (download_release, None),
  94. 'download_extension': (download_extension, None),
  95. 'download_community': (download_community, None)
  96. }
  97. # Common substitutions
  98. rst_epilog = "\n" \
  99. ".. |install_directory_winXP| replace:: :file:`C:\Program Files\\\\GeoServer "+release+"`\n" \
  100. ".. |install_directory_win| replace:: :file:`C:\\\\Program Files (x86)\\\\GeoServer "+release+"`\n" \
  101. ".. |install_directory_linux| replace:: :file:`/var/lib/tomcat7/webapps/geoserver`\n" \
  102. ".. |install_directory_mac| replace:: :file:`/Applications`\n" \
  103. ".. |data_directory_winXP| replace:: :file:`C:\Program Files\\\\GeoServer "+release+"\\\\data_dir`\n" \
  104. ".. |data_directory_win| replace:: :file:`C:\\\\Program Files (x86)\\\\GeoServer "+release+"\\\\data_dir`\n" \
  105. ".. |data_directory_linux| replace:: :file:`/var/lib/tomcat7/webapps/geoserver/data`\n" \
  106. ".. |data_directory_mac| replace:: :file:`/Applications/GeoServer.app/Contents/Resources/Java/data_dir`"
  107. # Options for HTML output
  108. # -----------------------
  109. html_theme = 'geoserver'
  110. html_theme_path = ['../../../en/themes']
  111. if os.environ.get('HTML_THEME_PATH'):
  112. html_theme_path.append(os.environ.get('HTML_THEME_PATH'))
  113. # The style sheet to use for HTML and HTML Help pages. A file of that name
  114. # must exist either in Sphinx' static/ path, or in one of the custom paths
  115. # given in html_static_path.
  116. #html_style = 'default.css'
  117. # The name for this set of Sphinx documents. If None, it defaults to
  118. # "<project> v<release> documentation".
  119. html_title = project + " " + release + " " + manual
  120. # A shorter title for the navigation bar. Default is the same as html_title.
  121. #html_short_title = None
  122. # The name of an image file (relative to this directory) to place at the top
  123. # of the sidebar.
  124. #html_logo = None
  125. # The name of an image file (within the static path) to use as favicon of the
  126. # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
  127. # pixels large.
  128. html_favicon = '../../../en/themes/geoserver/static/geoserver.ico'
  129. # Add any paths that contain custom static files (such as style sheets) here,
  130. # relative to this directory. They are copied after the builtin static files,
  131. # so a file named "default.css" will overwrite the builtin "default.css".
  132. #html_static_path = ['../../theme/_static']
  133. # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  134. # using the given strftime format.
  135. html_last_updated_fmt = '%b %d, %Y'
  136. # If true, SmartyPants will be used to convert quotes and dashes to
  137. # typographically correct entities.
  138. #html_use_smartypants = True
  139. # Custom sidebar templates, maps document names to template names.
  140. #html_sidebars = {}
  141. # Additional templates that should be rendered to pages, maps page names to
  142. # template names.
  143. #html_additional_pages = {}
  144. # If false, no module index is generated.
  145. html_use_modindex = False
  146. # If false, no index is generated.
  147. html_use_index = False
  148. # If true, the index is split into individual pages for each letter.
  149. #html_split_index = False
  150. # If true, the sphinx sources are included in the HTML build as _sources/<name>.
  151. html_copy_source = False
  152. # If true, links to the page source are added to each page.
  153. html_show_sourcelink = False
  154. # If true, an OpenSearch description file will be output, and all pages will
  155. # contain a <link> tag referring to it. The value of this option must be the
  156. # base URL from which the finished HTML is served.
  157. #html_use_opensearch = ''
  158. # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
  159. #html_file_suffix = ''
  160. # Output file base name for HTML help builder.
  161. htmlhelp_basename = 'GeoServerUserManual'
  162. html_context = {
  163. 'display_github': True,
  164. 'github_user': 'geoserver',
  165. 'github_repo': 'geoserver',
  166. 'github_version': 'main',
  167. 'conf_py_path': 'doc/zhCN/user/source'
  168. }
  169. # Options for LaTeX output
  170. # ------------------------
  171. # The paper size ('letter' or 'a4').
  172. #latex_paper_size = 'letter'
  173. # The font size ('10pt', '11pt' or '12pt').
  174. #latex_font_size = '10pt'
  175. # Grouping the document tree into LaTeX files. List of tuples
  176. # (source start file, target name, title, author, document class [howto/manual]).
  177. latex_documents = [
  178. ('index', 'GeoServerUserManual.tex', u'GeoServer User Manual',
  179. u'GeoServer', 'manual'),
  180. ]
  181. # The name of an image file (relative to this directory) to place at the top of
  182. # the title page.
  183. latex_logo = '../../../en/themes/geoserver/static/GeoServer_500.png'
  184. # For "manual" documents, if this is true, then toplevel headings are parts,
  185. # not chapters.
  186. #latex_use_parts = False
  187. # Additional stuff for the LaTeX preamble.
  188. latex_elements = {
  189. 'fontpkg': '\\usepackage{palatino}',
  190. 'fncychap': '\\usepackage[Sonny]{fncychap}',
  191. 'preamble': #"""\\usepackage[parfill]{parskip}
  192. """
  193. \\hypersetup{
  194. colorlinks = true,
  195. linkcolor = [rgb]{0,0.46,0.63},
  196. anchorcolor = [rgb]{0,0.46,0.63},
  197. citecolor = blue,
  198. filecolor = [rgb]{0,0.46,0.63},
  199. pagecolor = [rgb]{0,0.46,0.63},
  200. urlcolor = [rgb]{0,0.46,0.63}
  201. }
  202. """
  203. }
  204. # Documents to append as an appendix to all manuals.
  205. #latex_appendices = []
  206. # If false, no module index is generated.
  207. #latex_use_modindex = True