Skip to content

Commit

Permalink
docs: update theme
Browse files Browse the repository at this point in the history
docs: update conf.py

docs: update conf.py

docs: Update conf.py

docs: update conf.py

docs: Update conf.py

docs: update conf.py
  • Loading branch information
dgarcia360 authored and avelanarius committed Dec 7, 2023
1 parent 085dd34 commit 0d1f1c4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
17 changes: 8 additions & 9 deletions README-dev.md
Original file line number Diff line number Diff line change
@@ -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 <https://sphinx-theme.scylladb.com/stable/getting-started/quickstart.html>`_.

## 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/<VERSION>/api` directory.
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pristine: clean
clean:
rm -rf $(BUILDDIR)/*
rm -rf $(SOURCEDIR)/*
rm -f poetry.lock

# Generate output commands
.PHONY: dirhtml
Expand Down
2 changes: 1 addition & 1 deletion docs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 13 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
from datetime import date
import re
import warnings
from docutils import nodes
from recommonmark.transform import AutoStructify
from recommonmark.parser import CommonMarkParser, splitext, urlparse
Expand Down Expand Up @@ -169,6 +170,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 ""
Expand All @@ -177,6 +185,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', {
Expand All @@ -195,4 +206,5 @@ def setup(app):
app.connect('source-read', replace_relative_links)

# Create redirect to JavaDoc API
app.connect('build-finished', build_finished)
app.connect('build-finished', build_finished)

0 comments on commit 0d1f1c4

Please sign in to comment.