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

Draft: Enable a minimal docs linkcheck build #12015

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Documentation Process for NeMo

## Building the Documentation

1. Create and activate a virtual environment.

1. Install the documentation dependencies:

```console
$ python3 -m pip install -r requirements/requirements_docs.txt
```

1. Build the documentation:

```console
$ make -C docs html
```

Specify `linkcheck` instead of `html` to check for broken external links.

36 changes: 9 additions & 27 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import sys
import glob

import sphinx_book_theme

# 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.
Expand Down Expand Up @@ -119,7 +117,7 @@
# "sphinx.ext.autosectionlabel",
"sphinxcontrib.bibtex",
"sphinx_copybutton",
"sphinxext.opengraph",
# "sphinxext.opengraph",
]

bibtex_bibfiles = [
Expand Down Expand Up @@ -177,16 +175,13 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "console"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "default"

### Previous NeMo theme
# # NVIDIA theme settings.
# html_theme = 'nvidia_theme'
Expand Down Expand Up @@ -222,27 +217,14 @@

# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

html_theme = "sphinx_book_theme"
html_logo = os.path.join('nv_logo.png')
html_theme = "nvidia_sphinx_theme"
html_copy_source = False
html_show_sourcelink = False
html_show_sphinx = False
html_title = 'NVIDIA NeMo'

html_theme_options = {
'logo_only': False,
'display_version': True,
# 'prev_next_buttons_location': 'bottom',
# 'style_external_links': False,
# 'style_nav_header_background': '#000000',
# Toc options
'collapse_navigation': False,
# 'sticky_navigation': False,
'navigation_depth': 10,
# 'includehidden': False,
# 'titles_only': False,
# Sphinx Book theme,
'repository_url': 'https://github.com/NVIDIA/NeMo',
'use_repository_button': True,
'show_navbar_depth': 1,
'show_toc_level': 10,
"icon_links": [],
}


Expand Down Expand Up @@ -271,8 +253,8 @@ def setup(app):
# ]

# OpenGraph settings
ogp_site_url = 'https://nvidia.github.io/NeMo/'
ogp_image = 'https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/_static/nv_logo.png'
# ogp_site_url = 'https://nvidia.github.io/NeMo/'
# ogp_image = 'https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/_static/nv_logo.png'

# MathJax CDN
# follow recommendation here https://www.sphinx-doc.org/en/master/usage/extensions/math.html#module-sphinx.ext.mathjax
Expand Down
19 changes: 7 additions & 12 deletions requirements/requirements_docs.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
boto3
Jinja2
latexcodec
numpy
pydata-sphinx-theme
Sphinx
sphinx-book-theme
sphinx-copybutton
sphinxcontrib-bibtex
sphinxext-opengraph
urllib3
wrapt
myst-parser<5
nvidia-sphinx-theme
sphinx<7.5
sphinx-copybutton<=0.6
sphinx-reredirects<0.2
sphinxcontrib-bibtex<2.7
toml==0.10.2