diff --git a/.husky/pre-commit b/.husky/pre-commit index 610c2a54..f113113c 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,3 +2,4 @@ . "$(dirname -- "$0")/_/husky.sh" npm test +cd docs && ./scripts/doc8_style_check.sh && ./scripts/sphinx_build_link_check.sh diff --git a/docs/Makefile b/docs/Makefile index 788b0396..4dbe40a6 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -20,6 +20,7 @@ docs: @echo @echo "Starting up the docs server..." @echo + make clean $(SPHINXAUTOBUILD) --port 8000 --watch ${SOURCEDIR} $(SOURCEDIR) "$(BUILDDIR)/html" $(SPHINXOPTS) $(O) # Catch-all target: route all unknown targets to Sphinx using the new diff --git a/docs/README.md b/docs/README.md index da05a623..7066d3d4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,7 @@ The first step you want to do is create the python virtual environment: ``` $ cd docs/ -$ python3 -m venv venv +$ python -m venv venv $ source venv/bin/activate $ pip install -r requirements.txt ``` diff --git a/docs/requirements.txt b/docs/requirements.txt index f2b6ba73..f9d698de 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -7,3 +7,4 @@ doc8>=0.11.2 jinja2 markupSafe sphinx-copybutton +sphinx_rtd_dark_mode diff --git a/docs/source/conf.py b/docs/source/conf.py index c17de120..cb011969 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,7 @@ author = 'nexB Inc. and others' github_user = "nexB" github_repo = "scancode-workbench" -github_branch = "update/docs" +github_branch = "develop" html_favicon = '_static/favicon.ico' # -- General configuration --------------------------------------------------- @@ -87,7 +87,7 @@ "conf_py_path": "/docs/source/", # path in the checkout to the docs root } -html_css_files = ["_static/theme_overrides.css"] +html_css_files = ["theme_overrides.css"] # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. @@ -117,6 +117,11 @@ 'scan_samples': (f"https://github.com/{github_user}/{github_repo}/blob/{github_branch}/samples/%s", '%s'), } +# Ignore following links in linkcheck +linkcheck_ignore = [ + 'https://matrix.to/#/#aboutcode-org_discuss:gitter.im' +] + # -- Options for LaTeX output ------------------------------------------------- latex_elements = { diff --git a/docs/source/contribute/building.rst b/docs/source/contribute/building.rst index 7986593f..21fa7b8f 100644 --- a/docs/source/contribute/building.rst +++ b/docs/source/contribute/building.rst @@ -100,7 +100,7 @@ Create python environment, make docs cd docs/ # Setup virtual environment for python dependencies - python3 -m venv venv + python -m venv venv source venv/bin/activate # Install dependencies diff --git a/docs/source/how-to-guides/explore-your-data/navigate-license-explorer.rst b/docs/source/how-to-guides/explore-your-data/navigate-license-explorer.rst index 889d9fc7..4a6089fb 100644 --- a/docs/source/how-to-guides/explore-your-data/navigate-license-explorer.rst +++ b/docs/source/how-to-guides/explore-your-data/navigate-license-explorer.rst @@ -47,7 +47,8 @@ Similarly, detection origin is a clickable icon. It determines the source of det - Package icon indicates that the detection belongs to a package manifest, you can click on it to view the source package manifest in :ref:`package-explorer`. -- File icon indicates that the detection belongs to a plain file, you can click on it to view the file in :ref:`table-view`. +- File icon indicates that the detection belongs to a plain file, + you can click on it to view the file in :ref:`table-view`. .. figure:: data/license-explorer-fileregion.gif diff --git a/docs/source/how-to-guides/explore-your-data/navigate-package-explorer.rst b/docs/source/how-to-guides/explore-your-data/navigate-package-explorer.rst index a8414c2d..dddd082d 100644 --- a/docs/source/how-to-guides/explore-your-data/navigate-package-explorer.rst +++ b/docs/source/how-to-guides/explore-your-data/navigate-package-explorer.rst @@ -37,7 +37,7 @@ dependency flags by selecting filter values in the top-left .. figure:: data/package-explorer-filter.gif -Dependencies table +Dependencies ======================== When a package is selected, the dependencies for that package are shown diff --git a/docs/source/ui-reference/license-explorer.rst b/docs/source/ui-reference/license-explorer.rst index ebff9fac..bc6cea2f 100644 --- a/docs/source/ui-reference/license-explorer.rst +++ b/docs/source/ui-reference/license-explorer.rst @@ -101,7 +101,8 @@ Similarly, detection origin is a clickable icon. It determines the source of det - Package icon indicates that the detection belongs to a package manifest, you can click on it to view the source package manifest in :ref:`package-explorer`. -- File icon indicates that the detection belongs to a plain file, you can click on it to view the file in :ref:`table-view`. +- File icon indicates that the detection belongs to a plain file, + you can click on it to view the file in :ref:`table-view`. .. figure:: data/license-explorer/license-explorer-fileregion.gif diff --git a/docs/source/ui-reference/pie-charts.rst b/docs/source/ui-reference/pie-charts.rst index 55a3bad9..38af1092 100644 --- a/docs/source/ui-reference/pie-charts.rst +++ b/docs/source/ui-reference/pie-charts.rst @@ -39,7 +39,7 @@ You can click on the legend items to toggle the visibility of corresponding pie .. figure:: data/pie-charts/pie-charts-legend-toggle.gif :align: center :width: 100% - + Click legend item to toggle segment visibility in Pie chart .. include:: ../rst_snippets/scans-used.rst diff --git a/docs/source/ui-reference/table-view.rst b/docs/source/ui-reference/table-view.rst index 745eb246..ab6db345 100644 --- a/docs/source/ui-reference/table-view.rst +++ b/docs/source/ui-reference/table-view.rst @@ -112,8 +112,8 @@ using ``and``, ``or`` in combination with different search patterns like .. figure:: data/tableview/tableview-column-filter-search.gif -Search ------------------------- +Search in tableview +---------------------------- Use the ``Search`` bar in the top-right corner to perform searches within the specified directory scope and selected column fields (hidden columns are excluded from the search)