To access GMTSAR Documentation page: https://gmtsar.github.io/documentation/
First install these using pip install:
- sphinx
- sphinx_rtd_theme
- sphinx-panels
Check out Sphinx Documentation Docs: https://www.sphinx-doc.org/en/master/
How to add a module:
- go to
source/
, copy an exisiting module to a new_module_name.rst - edit the file, change names, add description, usage, examples
- add this new_module_name to module.rst
- go to
documentation/
and runmake html
, then check build/html/index.html - from
documentation/
copy the built html files todocs/
to update the github pages build:cp build/html/*.html docs/
How to edit a module:
- git pull the current version to your local
- edit the .rst file for the tool you want to edit inside the
source/
directory - go to
documentation/
and runmake html
, then check build/html/index.html - from
documentation/
copy the built html files todocs/
to update the github pages build:cp build/html/*.html docs/
- git add the file you changed (git add source/file.rst) and git add the html file change (git add docs/file.html)
- git commit the changes
- git push
Check out source/ALOS_merge.rst as an example of formatting for each documentation page (.rst file).
Three main structure rules are suggested to maintain consistency:
-
Subheadings are delineated by "underlining" your subheader text with "----" characters. The main subheadings are Synopsis, Description, Required Arguments, [ Optional Arguments , if necessary], and Example. In addition, if specific tools have Citations/References, they are listed in a References subheading at the bottom.
-
Underneath Synopsis, the name of the tool is bolded with two asterisks characters on either side of the word (e.g.,
**ALOS_look**
), and all generic argument names are italicized with single asterisks on each side of the argument name (e.g.,*inputfile*
) -
Underneath Required Arguments input file names are listed with their names starting in the first character column, in italics. The description of the input argument is placed two carriage returns and a tab over beneath the name.
-
To link another documentation page to the page you are working on, you must reference the exact name of the other tool page. To build the link, type
:doc:`name`
(e.g., if I wanted to link to preproc_batch_tops.csh, I'd make a link such as:doc:`preproc_batch_tops.csh`
). When the html pages are built, the links will be visible and usable.
Github will host our pre-built documentation html files using Github pages, as long as the html files are stored in the docs/
directory.
Information about how to set this up (for reference): https://python.plainenglish.io/how-to-host-your-sphinx-documentation-on-github-550254f325ae