From e36c4d3fbab938be0f6a24c10aa6204f84099c2a Mon Sep 17 00:00:00 2001 From: Byron Peebles Date: Mon, 10 Jun 2024 10:12:29 -0400 Subject: [PATCH] Documentation: Update some Sphinx-style code ref roles to MyST style (#12030) --- CHANGELOG.txt | 1 + CONTRIBUTORS.md | 1 + docs/reference/contrib/redirects.md | 2 +- docs/reference/contrib/routablepage.md | 2 +- docs/reference/pages/index.md | 2 +- docs/reference/pages/model_reference.md | 2 +- docs/releases/6.2.md | 1 + 7 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c86c05bb10..ee4526dcb0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,7 @@ Changelog * Docs: Remove duplicate section on frontend caching proxies from performance page (Jake Howard) * Docs: Document `restriction_type` field on PageViewRestriction (Shlomo Markowitz) * Docs: Document Wagtail's bug bounty policy (Jake Howard) + * Docs: Fix incorrect Sphinx-style code references to use MyST style (Byron Peebles) * 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 ded29460ae..e8cc9ede81 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -819,6 +819,7 @@ * Nigel van Keulen * Matthias Brück * Julie Rymer +* Byron Peebles ## Translators diff --git a/docs/reference/contrib/redirects.md b/docs/reference/contrib/redirects.md index 7049865005..e89c98ec13 100644 --- a/docs/reference/contrib/redirects.md +++ b/docs/reference/contrib/redirects.md @@ -43,7 +43,7 @@ Wagtail automatically creates permanent redirects for pages (and their descendan If your project uses `RoutablePageMixin` to create pages with alternative routes, you might want to consider overriding the `get_route_paths()` method for those page types. Adding popular route paths to this list will result in the creation of additional redirects; helping visitors to alternative routes to get to the right place also. -For more information, please see :meth:`~wagtail.models.Page.get_route_paths`. +For more information, please see {meth}`~wagtail.models.Page.get_route_paths`. ### Disabling automatic redirect creation diff --git a/docs/reference/contrib/routablepage.md b/docs/reference/contrib/routablepage.md index 67d41db2ee..7b0857589f 100644 --- a/docs/reference/contrib/routablepage.md +++ b/docs/reference/contrib/routablepage.md @@ -26,7 +26,7 @@ INSTALLED_APPS = [ ## The basics -To use `RoutablePageMixin`, you need to make your class inherit from both :class:`wagtail.contrib.routable_page.models.RoutablePageMixin` and {class}`wagtail.models.Page`, then define some view methods and decorate them with `path` or `re_path`. +To use `RoutablePageMixin`, you need to make your class inherit from both {class}`wagtail.contrib.routable_page.models.RoutablePageMixin` and {class}`wagtail.models.Page`, then define some view methods and decorate them with `path` or `re_path`. These view methods behave like ordinary Django view functions, and must return an `HttpResponse` object; typically this is done through a call to `django.shortcuts.render`. diff --git a/docs/reference/pages/index.md b/docs/reference/pages/index.md index 89e606db15..912c54673c 100644 --- a/docs/reference/pages/index.md +++ b/docs/reference/pages/index.md @@ -1,6 +1,6 @@ # Pages -Wagtail requires a little careful setup to define the types of content that you want to present through your website. The basic unit of content in Wagtail is the :class:`~wagtail.models.Page`, and all of your page-level content will inherit basic webpage-related properties from it. But for the most part, you will be defining content yourself, through the construction of Django models using Wagtail's `Page` as a base. +Wagtail requires a little careful setup to define the types of content that you want to present through your website. The basic unit of content in Wagtail is the {class}`~wagtail.models.Page`, and all of your page-level content will inherit basic webpage-related properties from it. But for the most part, you will be defining content yourself, through the construction of Django models using Wagtail's `Page` as a base. Wagtail organizes content created from your models in a tree, which can have any structure and combination of model objects in it. Wagtail doesn't prescribe ways to organize and interrelate your content, but here we've sketched out some strategies for organizing your models. diff --git a/docs/reference/pages/model_reference.md b/docs/reference/pages/model_reference.md index d89f0aa969..6c526020ef 100644 --- a/docs/reference/pages/model_reference.md +++ b/docs/reference/pages/model_reference.md @@ -437,7 +437,7 @@ The {meth}`~wagtail.models.Site.find_for_request` function returns the Site obje ## `Locale` The `Locale` model defines the set of languages and/or locales that can be used on a site. -Each `Locale` record corresponds to a "language code" defined in the :ref:`wagtail_content_languages_setting` setting. +Each `Locale` record corresponds to a "language code" defined in the {ref}`wagtail_content_languages_setting` setting. Wagtail will initially set up one `Locale` to act as the default language for all existing content. This first locale will automatically pick the value from `WAGTAIL_CONTENT_LANGUAGES` that most closely matches the site primary language code defined in `LANGUAGE_CODE`. diff --git a/docs/releases/6.2.md b/docs/releases/6.2.md index ea6da2641a..3a2ac1d166 100644 --- a/docs/releases/6.2.md +++ b/docs/releases/6.2.md @@ -40,6 +40,7 @@ depth: 1 * Remove duplicate section on frontend caching proxies from performance page (Jake Howard) * Document `restriction_type` field on PageViewRestriction (Shlomo Markowitz) * Document Wagtail's bug bounty policy (Jake Howard) + * Fix incorrect Sphinx-style code references to use MyST style (Byron Peebles) ### Maintenance