diff --git a/README-dev.md b/README-dev.md index 5da38fd77da..71234332fcf 100644 --- a/README-dev.md +++ b/README-dev.md @@ -1,17 +1,16 @@ # Building the docs -The docs build instructions have been tested with Sphinx 4 and Fedora 32. - ## Prerequisites -To build and preview the docs locally, you will need to install the following software: +To build the documentation of this project, you need a UNIX-based operating system. Windows is not fully supported as it does not support symlinks. + +You also need the following software installed to generate the reference documentation of the driver: -- Git -- Python 3.7 -- pip -- Java JDK 8 or above +- Java JDK 8 or higher - Maven -## Commands +Once you have installed the above software, you can build and preview the documentation by following the steps outlined in the `Quickstart guide `_. + +## Custom commands -For more information, see [Commands](https://sphinx-theme.scylladb.com/stable/commands.html). +To generate the reference documentation of the driver, run the command `make javadoc`. This command generates the reference documentation using the Javadoc tool in the `_build/dirhtml//api` directory. diff --git a/docs/Makefile b/docs/Makefile index 63c08467e70..1e3374a9b00 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -43,6 +43,7 @@ pristine: clean clean: rm -rf $(BUILDDIR)/* rm -rf $(SOURCEDIR)/* + rm -f poetry.lock # Generate output commands .PHONY: dirhtml diff --git a/docs/pyproject.toml b/docs/pyproject.toml index db4a135bd8e..82a58bed359 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -10,7 +10,7 @@ pyyaml = "6.0" pygments = "2.2.0" recommonmark = "0.7.1" redirects_cli ="~0.1.3" -sphinx-scylladb-theme = "~1.3.1" +sphinx-scylladb-theme = "~1.4.1" sphinx-sitemap = "2.1.0" sphinx-autobuild = "2021.3.14" Sphinx = "4.3.2" diff --git a/docs/source/conf.py b/docs/source/conf.py index 961476dd9bc..45164d2a351 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -5,6 +5,7 @@ from datetime import date import yaml import re +import warnings from docutils import nodes from recommonmark.transform import AutoStructify from recommonmark.parser import CommonMarkParser, splitext, urlparse @@ -171,6 +172,13 @@ def replace_relative_links(app, docname, source): result = re.sub(key, app.config.replacements[key], result) source[0] = result + +def build_inited(app): + warnings.filterwarnings( + action="ignore", + message=r".*Document name contains underscores:.*", + ) + def build_finished(app, exception): version_name = os.getenv("SPHINX_MULTIVERSION_NAME", "") version_name = "/" + version_name if version_name else "" @@ -179,6 +187,9 @@ def build_finished(app, exception): redirects_cli.create(redirect_to=redirect_to,out_file=out_file) def setup(app): + # Filter warnings + app.connect('builder-inited', build_inited) + # Setup Markdown parser app.add_source_parser(CustomCommonMarkParser) app.add_config_value('recommonmark_config', { @@ -198,3 +209,4 @@ def setup(app): # Create redirect to JavaDoc API app.connect('build-finished', build_finished) +