diff --git a/docs/Dockerfile b/docs/Dockerfile index 61d15fa058bb..e53e5e593838 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -10,10 +10,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM sphinxdoc/sphinx:3.3.0 +FROM sphinxdoc/sphinx:5.0.2 # Required by pillow -RUN apt update -y && apt install -y zlib1g-dev libjpeg-dev build-essential +RUN apt update -y && apt install -y zlib1g-dev libjpeg-dev libxml2-dev libxslt-dev build-essential WORKDIR /docs ADD requirements.txt /docs diff --git a/docs/build b/docs/build index 582e480acad4..bb1f30b1b41c 100755 --- a/docs/build +++ b/docs/build @@ -6,7 +6,7 @@ cd "${BASH_SOURCE%/*}" test -t 1 && OPTS='-it' || OPTS='' -SPHINX_IMAGE=${SPHINX_IMAGE:-ghcr.io/trinodb/build/sphinx:3} +SPHINX_IMAGE=${SPHINX_IMAGE:-ghcr.io/trinodb/build/sphinx:5} docker run --rm $OPTS -e TRINO_VERSION -u $(id -u):$(id -g) -v "$PWD":/docs $SPHINX_IMAGE \ sphinx-build -q -j auto -b html -W -d target/doctrees src/main/sphinx target/html > /dev/null diff --git a/docs/requirements.in b/docs/requirements.in new file mode 100644 index 000000000000..b0f492d69d46 --- /dev/null +++ b/docs/requirements.in @@ -0,0 +1,5 @@ +markupsafe==2.0.1 +myst-parser +pillow +sphinx-material +sphinx-copybutton diff --git a/docs/requirements.txt b/docs/requirements.txt index 41cba35e5891..8eb552dad5ea 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,24 +1,101 @@ -attrs==19.3.0 +# +# This file is autogenerated by pip-compile with python 3.9 +# To update, run: +# +# pip-compile requirements.in +# +alabaster==0.7.12 + # via sphinx +babel==2.10.3 + # via sphinx beautifulsoup4==4.9.1 + # via sphinx-material certifi==2019.11.28 + # via requests +chardet==3.0.4 + # via requests css-html-js-minify==2.5.5 + # via sphinx-material +docutils==0.18.1 + # via + # myst-parser + # sphinx idna==2.9 -Jinja2==2.11.1 + # via requests +imagesize==1.4.1 + # via sphinx +importlib-metadata==4.12.0 + # via sphinx +jinja2==2.11.1 + # via + # myst-parser + # sphinx lxml==4.5.2 -markdown-it-py==0.5.6 -myst-parser==0.12.10 + # via sphinx-material +markdown-it-py==2.1.0 + # via + # mdit-py-plugins + # myst-parser +markupsafe==2.0.1 + # via + # -r requirements.in + # jinja2 +mdit-py-plugins==0.3.0 + # via myst-parser +mdurl==0.1.1 + # via markdown-it-py +myst-parser==0.18.0 + # via -r requirements.in packaging==20.3 -Pillow==7.0.0 -Pygments==2.5.2 + # via sphinx +pillow==9.2.0 + # via -r requirements.in +pygments==2.5.2 + # via sphinx pyparsing==2.4.6 -python-slugify==4.0.1 + # via packaging +python-slugify[unidecode]==4.0.1 + # via sphinx-material pytz==2019.3 -PyYAML==5.3.1 + # via babel +pyyaml==6.0 + # via myst-parser requests==2.23.0 + # via sphinx six==1.14.0 + # via packaging +snowballstemmer==2.2.0 + # via sphinx soupsieve==2.0.1 -sphinx-material==0.0.30 + # via beautifulsoup4 +sphinx==5.0.2 + # via + # myst-parser + # sphinx-copybutton + # sphinx-material sphinx-copybutton==0.3.1 + # via -r requirements.in +sphinx-material==0.0.30 + # via -r requirements.in +sphinxcontrib-applehelp==1.0.2 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.0 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx text-unidecode==1.3 -Unidecode==1.1.1 + # via python-slugify +typing-extensions==4.3.0 + # via myst-parser +unidecode==1.1.1 + # via python-slugify urllib3==1.25.8 + # via requests +zipp==3.8.1 + # via importlib-metadata diff --git a/docs/src/main/sphinx/conf.py b/docs/src/main/sphinx/conf.py index 22c906a67136..71c2574ab727 100644 --- a/docs/src/main/sphinx/conf.py +++ b/docs/src/main/sphinx/conf.py @@ -115,7 +115,8 @@ def setup(app): html_logo = 'images/trino.svg' -html_add_permalinks = '#' +html_permalinks = True +html_permalinks_icon = '#' html_show_copyright = False html_show_sphinx = False diff --git a/docs/src/main/sphinx/docutils.conf b/docs/src/main/sphinx/docutils.conf new file mode 100644 index 000000000000..0942c7e0890e --- /dev/null +++ b/docs/src/main/sphinx/docutils.conf @@ -0,0 +1,2 @@ +[html writers] +table_style = colwidths-grid