diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 93eaa7d909..426db1cf00 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -56,6 +56,7 @@ Changelog * Docs: Add better docs for generating URLs on creating admin views (Shlomo Markowitz) * Docs: Document the `vary_fields` property for custom image filters (Daniel Kirkham) * Docs: Fix documentation build errors (Himanshu Garg, Chris Shenton) + * Docs: Fix PDF export (Nathanaël) * Maintenance: Use `DjangoJSONEncoder` instead of custom `LazyStringEncoder` to serialize Draftail config (Sage Abdullah) * Maintenance: Refactor image chooser pagination to check `WAGTAILIMAGES_CHOOSER_PAGE_SIZE` at runtime (Matt Westcott) * Maintenance: Exclude the `client/scss` directory in Tailwind content config to speed up CSS compilation (Sage Abdullah) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 1544aca8b9..f1da73dbbe 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -826,6 +826,7 @@ * Jeroen de Vries * Romein van Buren * Chris Shenton +* Nathanaël ## Translators diff --git a/docs/Makefile b/docs/Makefile index d5d0de4d01..26cd257237 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -2,7 +2,7 @@ # # You can set these variables from the command line. -SPHINXOPTS = -W --keep-going -n -jauto +SPHINXOPTS = --fail-on-warning -n -jauto SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build diff --git a/docs/_static/images/draftail_entity_stock_source.png b/docs/_static/images/draftail_entity_stock_source.png new file mode 100644 index 0000000000..13dcf30b2c Binary files /dev/null and b/docs/_static/images/draftail_entity_stock_source.png differ diff --git a/docs/_static/images/releasenotes_1_5_unlink.png b/docs/_static/images/releasenotes_1_5_unlink.png new file mode 100644 index 0000000000..762170ad29 Binary files /dev/null and b/docs/_static/images/releasenotes_1_5_unlink.png differ diff --git a/docs/conf.py b/docs/conf.py index 9211e5b44f..c666e9bb58 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,9 +17,13 @@ from datetime import datetime import django import sphinx_wagtail_theme +from sphinx.builders.html import StandaloneHTMLBuilder from wagtail import VERSION, __version__ +# use png images as fallback, required to build pdf +StandaloneHTMLBuilder.supported_image_types = ["image/gif", "image/png"] + # on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org on_rtd = os.environ.get("READTHEDOCS", None) == "True" @@ -246,6 +250,9 @@ htmlhelp_basename = "Wagtaildoc" # -- Options for LaTeX output --------------------------------------------- +# Xelatex engine is required to include unicode characters in the doc +latex_engine = "xelatex" + latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # 'papersize': 'letterpaper', diff --git a/docs/extending/extending_draftail.md b/docs/extending/extending_draftail.md index 9ef9806ed2..9362858c21 100644 --- a/docs/extending/extending_draftail.md +++ b/docs/extending/extending_draftail.md @@ -156,7 +156,9 @@ They want to write articles about the stock market, refer to specific stocks any The editor toolbar could contain a "stock chooser" that displays a list of available stocks, then inserts the user’s selection as a textual token. For our example, we will just pick a stock at random: -![Draftail entity stock source](../_static/images/draftail_entity_stock_source.gif) +```{eval-rst} +.. image:: ../_static/images/draftail_entity_stock_source.* +``` Those tokens are then saved in the rich text on publish. When the news article is displayed on the site, we then insert live market data coming from an API next to each token: diff --git a/docs/releases/1.5.rst b/docs/releases/1.5.rst index c2e0b0256d..dfc5259092 100644 --- a/docs/releases/1.5.rst +++ b/docs/releases/1.5.rst @@ -43,7 +43,7 @@ See :doc:`/reference/contrib/table_block` for documentation. This feature was de Improved link handling in rich text ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. image:: ../_static/images/releasenotes_1_5_unlink.gif +.. image:: ../_static/images/releasenotes_1_5_unlink.* The user experience around inserting, editing and removing links inside rich text areas has been greatly improved: link destinations are shown as tooltips, and existing links can be edited as well as unlinked. This feature was developed by Loic Teixeira. diff --git a/docs/releases/6.2.md b/docs/releases/6.2.md index 27debdb927..d38f4c89ff 100644 --- a/docs/releases/6.2.md +++ b/docs/releases/6.2.md @@ -82,6 +82,7 @@ This feature was developed by Albina Starykova and sponsored by The Motley Fool. * Add better docs for generating URLs on [creating admin views](../extending/admin_views.md) (Shlomo Markowitz) * Document the `vary_fields` property for [custom image filters](custom_image_filters) (Daniel Kirkham) * Fix documentation build errors (Himanshu Garg, Chris Shenton) + * Fix PDF export (Nathanaël) ### Maintenance diff --git a/setup.py b/setup.py index fc297ac67b..7ca3fee4eb 100755 --- a/setup.py +++ b/setup.py @@ -71,7 +71,7 @@ testing_extras = [ documentation_extras = [ "pyenchant>=3.1.1,<4", "sphinxcontrib-spelling>=7,<8", - "Sphinx>=1.5.2", + "Sphinx>=7.3", "sphinx-autobuild>=0.6.0", "sphinx-wagtail-theme==6.3.0", "myst_parser==2.0.0",