Skip to content

Commit

Permalink
Merge pull request #62 from microbiomedata/60-hackathon-replace-obsol…
Browse files Browse the repository at this point in the history
…ete-schema-documentation-with-http-redirect-to-latest-docs

Redirect old schema docs pages to `github.io` site
  • Loading branch information
eecavanna authored Jul 12, 2024
2 parents fd79beb + 93a1cdb commit 4e0ac7d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
13 changes: 12 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
# ones.
extensions = [
'myst_parser',
'sphinx_markdown_tables'
'sphinx_markdown_tables',
'sphinx_reredirects'
]

# source_suffix = '.rst'
Expand Down Expand Up @@ -66,3 +67,13 @@
'css/custom.css',
]
html_logo = "_static/images/nmdc-logo-bg-white.png"

# -- Redirects ------------------------------------------

# Redirect old schema documentation URLs to the schema documentation
# that is automatically kept in sync with the schema.
# Reference: https://pypi.org/project/sphinx-reredirects/
redirects = {
"reference/metadata/xylene": "https://w3id.org/nmdc/xylene", # the latter redirects to: https://microbiomedata.github.io/nmdc-schema/xylene/
"reference/metadata/*": "https://w3id.org/nmdc/nmdc",
}
6 changes: 5 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
myst-parser
sphinx_markdown_tables
sphinx_rtd_theme
sphinx_rtd_theme

# Sphinx plugin that handles redirects.
# Reference: https://pypi.org/project/sphinx-reredirects/
sphinx-reredirects

0 comments on commit 4e0ac7d

Please sign in to comment.