Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign documentations #1308

Merged
merged 58 commits into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
36770ed
Update the sphinx_rtd_theme
leouieda Aug 1, 2019
b7a5992
Organize the front page table of contents
leouieda Aug 2, 2019
a01435c
Simplify the module documentation
leouieda Aug 2, 2019
f0f30ec
Remove redundant documents for API and changelog
leouieda Aug 2, 2019
68d677c
Remove the classic tutorial and cookbook
leouieda Aug 3, 2019
cde0265
Merge branch '6.0' into docs-refactor
seisman Aug 8, 2019
5dc4be5
Merge branch '6.0' into docs-refactor
seisman Aug 19, 2019
37df89d
Merge branch '6.0' into docs-refactor
seisman Aug 20, 2019
ea6d104
Start breaking down the tutorial and add custom CSS
leouieda Aug 28, 2019
5f4505e
Merge branch 'docs-refactor' of github.com:GenericMappingTools/gmt in…
leouieda Aug 28, 2019
523375c
Add list of supplementary modules
seisman Sep 10, 2019
9a057f0
Cleanup old module list files
seisman Sep 10, 2019
3e0f3b1
List classic-mode core and supplemental modules
seisman Aug 8, 2019
9d61924
Add links to the classic-mode documentations
seisman Aug 8, 2019
7d68fcd
Remove julia documentations
seisman Sep 10, 2019
48e9680
Cleanup some .rst_ files
seisman Sep 10, 2019
707d0aa
Cleanup ml_wrapper.rst
seisman Sep 10, 2019
5e71775
Cleanup unused files
seisman Sep 10, 2019
7b6fac2
Split tutorial into sections
seisman Sep 10, 2019
37d8a8e
merge 6.0 into docs-refactor
seisman Sep 10, 2019
71b5c31
Fix index for tutorial
seisman Sep 10, 2019
4e600c3
Improve tutorial
seisman Sep 10, 2019
993fae7
GMT_Tutorial.rst is not used any more
seisman Sep 11, 2019
0562c65
Merge branch '6.0' into docs-refactor
seisman Sep 11, 2019
7a41c50
Merge branch '6.0' into docs-refactor
seisman Sep 11, 2019
a9e526f
Clarify tutorial on makecpt and modern mode
seisman Sep 12, 2019
775c5a5
Remove GMT_Tutorial
seisman Sep 12, 2019
7ed6a86
Show major and minor version only
seisman Sep 12, 2019
d6ed51e
Fix tutorial title
seisman Sep 12, 2019
8b90a27
Defaults.rst is not needed
seisman Sep 12, 2019
63128ea
GMT_Datasets.rst is already in datasets.rst
seisman Sep 12, 2019
372252e
Remove locale
seisman Sep 12, 2019
9845bb8
Remove docs.rst_ and subplot.rst_
seisman Sep 12, 2019
a3a30ff
update index
seisman Sep 12, 2019
24735e6
Merge branch '6.0' into docs-refactor
seisman Sep 13, 2019
271dd41
Add the "Edit on GitHub" button
seisman Sep 13, 2019
cb214c3
Merge branch '6.0' into docs-refactor
seisman Sep 13, 2019
6165c83
Fix internal references in tutorial
seisman Sep 13, 2019
85765c7
Fix a broken link
seisman Sep 13, 2019
640bbbe
Fix a broken link
seisman Sep 13, 2019
194f244
Always use sphinx 1.8.5
seisman Sep 13, 2019
090ce84
Update copyright information
seisman Sep 14, 2019
e72d444
Move gallary/index.rst to gallery.rst so that gmt docs gallery still …
seisman Sep 15, 2019
08f61a2
Fix galllery layout
seisman Sep 15, 2019
b8e0ead
Update titles
seisman Sep 15, 2019
303191f
Merge 6.0 branch
seisman Sep 15, 2019
ebbb1d9
Add modern mode prime, which links to the GMT6 paper
seisman Sep 15, 2019
dbf2bdb
We no longer generate PDF documentations
seisman Sep 15, 2019
6de10e7
Fix the version shown in page title
seisman Sep 15, 2019
ce3ecc7
Add proj_codes
seisman Sep 15, 2019
c411435
Remove old proj_codes
seisman Sep 15, 2019
1b43480
Add link to classic supplements
seisman Sep 15, 2019
41d74e2
Improve links to classic tutorial and cookbook
seisman Sep 16, 2019
e756dcd
Add module alphabetic list
seisman Sep 16, 2019
e283bdd
Fix malformed tables
seisman Sep 16, 2019
36904d6
Fix an internal reference
seisman Sep 16, 2019
b3ed3b4
Fix an internal reference
seisman Sep 16, 2019
a4bb6de
Merge branch '6.0' into docs-refactor
seisman Sep 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/azure-pipelines-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:
set -x -e
sudo apt-get install -y --no-install-recommends --no-install-suggests \
python3-pip python3-setuptools python3-wheel graphicsmagick ffmpeg
pip3 install --user sphinx
pip3 install --user sphinx==1.8.5
echo "##vso[task.prependpath]$HOME/.local/bin"
displayName: Install dependencies for building documentation
condition: eq(variables['BUILD_DOCS'], true)
Expand Down
6 changes: 6 additions & 0 deletions doc/rst/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ if (SPHINX_FOUND)
${CMAKE_CURRENT_BINARY_DIR}/_themes)
add_depend_to_target (docs_html_depends _docs_copy_rst_tree_themes)
add_depend_to_target (docs_man_depends _docs_copy_rst_tree_themes)
copy_dir_if_different (_docs_copy_rst_tree_static
${CMAKE_CURRENT_SOURCE_DIR}/_static/
${CMAKE_CURRENT_BINARY_DIR}/_static)
add_depend_to_target (docs_html_depends _docs_copy_rst_tree_static)
add_depend_to_target (docs_pdf_depends _docs_copy_rst_tree_static)
add_depend_to_target (docs_man_depends _docs_copy_rst_tree_static)
add_custom_target (_docs_rst_mkdir_verbatim
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_CURRENT_BINARY_DIR}/_source/_verbatim
Expand Down
Binary file added doc/rst/_static/favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions doc/rst/_static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.wy-nav-content {
max-width: 1000px;
}
116 changes: 51 additions & 65 deletions doc/rst/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@
# GMT documentation build configuration file, created by
# sphinx-quickstart on Fri May 04 18:10:30 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os

#
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath('.'))

# -- General configuration -----------------------------------------------------

Expand All @@ -34,26 +30,20 @@ templates_path = ['_templates']
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'
source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'

# General information about the project.
gmt_team = u'The GMT Team'
project = u'GMT'
copyright = u' '.join(['@GMT_VERSION_YEAR@,', gmt_team])
project = 'GMT'
gmt_team = 'The GMT Team'
copyright = "@GMT_VERSION_YEAR@, {}.".format(gmt_team)

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '@GMT_PACKAGE_VERSION@'
# The full version, including alpha/beta/rc tags.
release = '@GMT_PACKAGE_VERSION_WITH_GIT_REVISION@'
if tags.has('tex'):
release = release.replace("_", "\\_")
# The version shown in the left sidebar.
version = '@GMT_PACKAGE_VERSION_MAJOR@.@GMT_PACKAGE_VERSION_MINOR@'
# The full version shown in the page title
release = '@GMT_PACKAGE_VERSION@'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -101,6 +91,37 @@ smartquotes_action = 'qe'
#html_theme = 'default'
html_theme = 'rtd'
html_theme_path = ["_themes"]
html_context = {
"menu_links": [
(
'<i class="fa fa-users fa-fw"></i> Contributing',
"https://github.com/GenericMappingTools/gmt/blob/master/CONTRIBUTING.md",
),
(
'<i class="fa fa-gavel fa-fw"></i> Code of Conduct',
"https://github.com/GenericMappingTools/gmt/blob/master/CODE_OF_CONDUCT.md",
),
(
'<i class="fa fa-book fa-fw"></i> License',
"https://github.com/GenericMappingTools/gmt/blob/master/LICENSE.TXT",
),
(
'<i class="fa fa-comment fa-fw"></i> Contact',
"https://gitter.im/GenericMappingTools/Lobby",
),
(
'<i class="fa fa-github fa-fw"></i> Source Code',
"https://github.com/GenericMappingTools/gmt",
),
],
# Show the "Edit on Github" link
"display_github": True,
"github_user": "GenericMappingTools",
"github_repo": "gmt",
"github_version": version,
"conf_py_path": "/doc/rst/source/"
}


# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -124,13 +145,13 @@ html_theme_path = ["_themes"]
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
html_favicon = "_static/favicon.png"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# We set html_static below so that sphinx copies video files to html/_static
html_static_path = ['_source/_static']
html_static_path = ['_static']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down Expand Up @@ -176,55 +197,18 @@ html_show_sourcelink = True
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None


# Load the custom CSS files (needs sphinx >= 1.6 for this to work)
def setup(app):
app.add_stylesheet("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'
]

# -- Options for LaTeX output --------------------------------------------------

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('GMT_Docs', 'GMT_Docs.tex', u'GMT Documentation', gmt_team, 'manual'),
('GMT_Tutorial', 'GMT_Tutorial.tex', u'GMT Tutorial', gmt_team, 'manual'),
('GMT_API', 'GMT_API.tex', u'GMT API Documentation', gmt_team, 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
latex_logo = '@CMAKE_CURRENT_BINARY_DIR@/_source/_images/GMT_coverlogo.pdf'

# LaTeX preamble
tex_preamble = r"""
\frenchspacing % use a standard word space between sentences
\fvset{fontsize=\scriptsize} % verbatim font size
"""

# The paper size ('a4paper' or 'letterpaper') and font size.
latex_elements = {
'papersize':'a4paper',
'pointsize':'11pt',
'preamble': tex_preamble}

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False

# If true, show page references after internal links.
#latex_show_pagerefs = False

# If true, show URL addresses after external links.
#latex_show_urls = False

# Documents to append as an appendix to all manuals.
#latex_appendices = []

# If false, no module index is generated.
#latex_domain_indices = True


# -- Options for manual page output --------------------------------------------

# One entry per manual page. List of tuples
Expand Down Expand Up @@ -381,3 +365,5 @@ man_pages = [
('supplements/x2sys/x2sys_report', 'x2sys_report', 'Report statistics from crossover data base', '', 1),
('supplements/x2sys/x2sys_solve', 'x2sys_solve', 'Determine least-squares systematic correction from crossovers', '', 1)
]


10 changes: 0 additions & 10 deletions doc/rst/source/B.rst

This file was deleted.

9 changes: 0 additions & 9 deletions doc/rst/source/C.rst

This file was deleted.

9 changes: 0 additions & 9 deletions doc/rst/source/D.rst

This file was deleted.

8 changes: 0 additions & 8 deletions doc/rst/source/Defaults.rst

This file was deleted.

9 changes: 0 additions & 9 deletions doc/rst/source/F.rst

This file was deleted.

11 changes: 0 additions & 11 deletions doc/rst/source/G.rst

This file was deleted.