1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
- # -*- coding: utf-8 -*-
- #
- # GMT documentation build configuration file.
- # Refer to http://www.sphinx-doc.org/en/master/usage/configuration.html for details.
- #
- import sys, os
- import glob
- sys.path.append(os.path.abspath('_extensions'))
- # -- General configuration -----------------------------------------------------
- needs_sphinx = '1.8'
- extensions = ['sphinx.ext.mathjax', 'sphinx.ext.autosectionlabel', 'jinja', 'youtube', 'sphinx_panels', 'sphinx_togglebutton', 'sphinx_copybutton']
- source_encoding = 'utf-8-sig'
- source_suffix = '.rst'
- master_doc = 'index'
- templates_path = ['_templates']
- language = 'en'
- # Set smartquotes_action to 'qe' to disable Smart Quotes transform of -- and ---
- smartquotes_action = 'qe'
- # default language to highlight source code
- highlight_language = 'bash'
- pygments_style = 'sphinx'
- autosectionlabel_prefix_document = True
- togglebutton_hint = "Click to show example script"
- # Disable sphinx_panels extension for manpage build
- if tags.has("nosphinxpanels"):
- extensions.remove("sphinx_panels")
- # -- Project configuration ------------------------------------------------
- project = 'GMT'
- copyright = "@GMT_VERSION_YEAR@, The GMT Team."
- # The version shown at the top of the sidebar
- version = '@GMT_PACKAGE_VERSION_MAJOR@.@GMT_PACKAGE_VERSION_MINOR@'
- # The full version shown in the page title
- release = '@GMT_PACKAGE_VERSION@'
- # -- Options for HTML output ---------------------------------------------------
- html_theme = 'rtd'
- html_theme_path = ["themes"]
- html_theme_options = {
- 'sticky_navigation': False,
- 'includehidden': False,
- }
- html_context = {
- "menu_links": [
- (
- '<i class="fa fa-home fa-fw"></i> GMT Homepage',
- "https://www.generic-mapping-tools.org/",
- ),
- (
- '<i class="fa fa-comment fa-fw"></i> GMT Community Forum',
- "https://forum.generic-mapping-tools.org/",
- ),
- (
- '<i class="fa fa-book fa-fw"></i> License',
- "https://github.com/GenericMappingTools/gmt/blob/master/LICENSE.TXT",
- ),
- (
- '<i class="fa fa-github fa-fw"></i> Source Code',
- "https://github.com/GenericMappingTools/gmt",
- ),
- ],
- # Show the "Edit on Github" link
- # https://docs.readthedocs.io/en/latest/guides/vcs.html
- "display_github": True,
- "github_user": "GenericMappingTools",
- "github_repo": "gmt",
- "github_version": "master",
- "theme_vcs_pageview_mode": "edit",
- "conf_py_path": "/doc/rst/source/",
- # Enable versions switch on GitHub Actions (`true`).
- "enable_versions_switch": True if os.getenv("GITHUB_ACTIONS") else False,
- }
- # favicon of the docs
- html_favicon = "_static/favicon.png"
- html_static_path = ['_static']
- html_last_updated_fmt = '%b %d, %Y'
- # If true, links to the reST sources are added to the pages.
- html_show_sourcelink = True
- # List of custom CSS files (needs sphinx>=1.8)
- html_css_files = ["style.css"]
- # Redefine supported_image_types for the HTML builder
- from sphinx.builders.html import StandaloneHTMLBuilder
- StandaloneHTMLBuilder.supported_image_types = [
- 'image/gif', 'image/jpeg', 'image/png', 'image/svg+xml'
- ]
- # context for the jinja extension
- ## Count number of examples (.rst) in the source/gallery directory
- no_of_examples = len(glob.glob("source/gallery/ex*.rst"))
- jinja_contexts = {
- 'jinja_ctx': {
- 'no_of_examples': no_of_examples,
- }
- }
- # -- Options for manual page output --------------------------------------------
- # One entry per manual page. List of tuples
- # (source start file, name, description, authors, manual section).
- man_pages = [
- ('gmt', 'gmt', 'The Generic Mapping Tools data processing and display software package', '', 1),
- ('gmt-config', 'gmt-config', 'Get information about the gmt installation', '', 1),
- ('gmt_shell_functions.sh', 'gmt_shell_functions.sh', 'Practical functions to be used in GMT bourne shell scripts', '', 1),
- ('gmtswitch', 'gmtswitch', 'Switching between different GMT versions', '', 1),
- ('isogmt', 'isogmt', 'Run GMT command or script in isolation mode', '', 1),
- ]
|