Skip to content

Commit

Permalink
GCHP RTD doc updates for consistency with GEOS-Chem and HEMCO RTD sites
Browse files Browse the repository at this point in the history
docs/source/conf.py
- Import pybtex alphabetic formatting style as AlphaStyle, which is
  the base class for GcRefStyle.  This will list all of the bibliography
  citations alphabetically by first-author surname.
- Add geos-chem-shared-docs/_static to html_static_path list
- Add html_css_files list
- Now display rectangular GEOS-Chem logo (as GCClassic and HEMCO do)
- Display the title above the logo (as GCClassic and HEMCO do)

docs/source/bibtex.json
- Removed. The version of sphinxcontrib-bibtex that we use (2.2.0) no
  longer requires a JSON file to list the references to be displayed.
  It can figure that out automatically.

docs/source/_static/css/icon_home.css
- Style sheet to change the project name (GCHP) above the GEOS-Chem logo
  from white to black.  This only affects the look of the page on a
  computer desktop web browser but not on a mobile device.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
  • Loading branch information
yantosca committed Aug 10, 2022
1 parent 5ba1f28 commit e423455
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
4 changes: 4 additions & 0 deletions docs/source/_static/css/icon_home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Sets the color of text above the GEOS-Chem logo to black at top left */
.wy-side-nav-search a {
color: black;
}
16 changes: 0 additions & 16 deletions docs/source/bibtex.json

This file was deleted.

29 changes: 19 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx_rtd_theme",
"sphinx_rtd_theme",
"sphinxcontrib.bibtex",
"recommonmark",
]
Expand All @@ -50,9 +50,7 @@ def format_labels(self, sorted_entries):
yield entry.key.replace("_", " ").replace("et al.", "et al.,")

class GCRefStyle(AlphaStyle):
# Using pybtex.style.formatting.alpha will list citations
# in alphabetical order by last author name, then by year.
# -- Bob Yantosca (30 Jun 2022)
# Sorts authors alphabetically by last name
default_name_style = LastFirst
default_sort_style = None
default_label_style = GCLabelStyle
Expand Down Expand Up @@ -95,14 +93,25 @@ def format_web_refs(self, e):
# 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".
html_static_path = ['_static']
html_static_path = [
'_static',
'geos-chem-shared-docs/_static/',
]

# CSS files that will override sphinx-rtd-theme default settings
# (paths are relative to _static, which is specified above)
html_css_files = [
'css/icon_home.css',
'theme_overrides.css',
]

# Display GEOS-Chem logo
# Display GEOS-Chem favicon and logo
html_favicon = 'geos-chem-shared-docs/_static/gc-o-logo-favicon.ico'
html_logo = "geos-chem-shared-docs/_static/geos-chem-logo.svg"
html_logo = "geos-chem-shared-docs/_static/GEOS-Chem_Logo_Light_Background.png"

# More theme settings
html_theme_options = {
'logo_only': True,
'display_version': False,
'style_nav_header_background': '#FCFCFC',
'logo_only': False, # Show logo & top text
'display_version': False, # Don't show version number
'style_nav_header_background': '#FCFCFC', # 99% white for top left bkgrnd
}

0 comments on commit e423455

Please sign in to comment.