Browse Source

Docs - fix whitespace formatting (Prettier)

LB Johnston 1 year ago
parent
commit
5292f7dc1f

+ 4 - 4
docs/advanced_topics/customisation/admin_templates.md

@@ -120,10 +120,10 @@ To customise the colours used in the admin user interface, inject a CSS file usi
 
 Colour variables are reused across both the light and dark themes of the admin interface. To change the colours of a specific theme, use:
 
-- `.w-theme-light` for the light theme.
-- `.w-theme-dark` for the dark theme.
-- `@media (prefers-color-scheme: light) { .w-theme-system { […] }}` for the light theme via system settings.
-- `@media (prefers-color-scheme: dark) { .w-theme-system { […] }}` for the dark theme via system settings.
+-   `.w-theme-light` for the light theme.
+-   `.w-theme-dark` for the dark theme.
+-   `@media (prefers-color-scheme: light) { .w-theme-system { […] }}` for the light theme via system settings.
+-   `@media (prefers-color-scheme: dark) { .w-theme-system { […] }}` for the dark theme via system settings.
 
 ## Specifying a site or page in the branding
 

+ 2 - 0
docs/advanced_topics/icons.md

@@ -77,6 +77,7 @@ Wagtail icons live in `wagtail/admin/templates/wagtailadmin/icons/`.
 Place your own SVG files in `<your_app>/templates/wagtailadmin/icons/`.
 
 (available_icons)=
+
 ## Available icons
 
 Enable the [styleguide](styleguide) to view the available icons and their names for any given project.
@@ -88,6 +89,7 @@ Here are all available icons out of the box:
 <summary>Toggle icons table</summary>
 
 ```{include} ../_static/wagtail_icons_table.txt
+
 ```
 
 </details>

+ 8 - 7
docs/advanced_topics/reference_index.md

@@ -7,11 +7,12 @@ Wagtail maintains a reference index, which records references between objects wh
 ## Configuration
 
 By default, the index will store references between objects managed within the Wagtail admin, specifically:
-- all Page types
-- Images
-- Documents
-- models registered as Snippets
-- models registered with ModelAdmin
+
+-   all Page types
+-   Images
+-   Documents
+-   models registered as Snippets
+-   models registered with ModelAdmin
 
 ```{versionchanged} 5.0
 When introduced in Wagtail 4.1, the Reference Index recorded references in all application models by default. Wagtail 5.0 reduced the scope of the default models to those specifically linked with Wagtail.
@@ -43,8 +44,8 @@ class SprocketAppConfig(AppConfig):
 
 The `wagtail_reference_index_ignore` attribute can be used to prevent indexing with a particular model or model field.
 
-- set the `wagtail_reference_index_ignore` attribute to `True` within any model class where you want to prevent indexing of all fields in the model; or
-- set the `wagtail_reference_index_ignore` attribute to `True` within any model field, to prevent that field or the related model field from being indexed:
+-   set the `wagtail_reference_index_ignore` attribute to `True` within any model class where you want to prevent indexing of all fields in the model; or
+-   set the `wagtail_reference_index_ignore` attribute to `True` within any model field, to prevent that field or the related model field from being indexed:
 
 ```python
 class CentralPage(Page):

+ 1 - 1
docs/contributing/ui_guidelines.md

@@ -96,7 +96,7 @@ We use inline SVG elements for Wagtail’s icons, for performance and so icons c
 
 ### Adding icons
 
-Icons are SVG files in the [Wagtail admin template folder](https://github.com/wagtail/wagtail/tree/main/wagtail/admin/templates/wagtailadmin/icons). 
+Icons are SVG files in the [Wagtail admin template folder](https://github.com/wagtail/wagtail/tree/main/wagtail/admin/templates/wagtailadmin/icons).
 
 When adding or updating an icon,
 

+ 9 - 4
docs/reference/pages/panels.md

@@ -15,6 +15,7 @@ Here are some built-in panel types that you can use in your panel definitions. T
 ```
 
 (field_panel)=
+
 ### FieldPanel
 
 ```{eval-rst}
@@ -65,6 +66,7 @@ Here are some built-in panel types that you can use in your panel definitions. T
 ```
 
 (inline_panels)=
+
 ### InlinePanel
 
 ```{eval-rst}
@@ -95,6 +97,7 @@ Here are some built-in panel types that you can use in your panel definitions. T
 ```
 
 (multiple_chooser_panel)=
+
 ### MultipleChooserPanel
 
 ````{class} MultipleChooserPanel(relation_name, chooser_field_name=None, panels=None, label='', min_num=None, max_num=None, **kwargs)
@@ -220,19 +223,21 @@ The `MultipleChooserPanel` definition on `BlogPage` would be:
 ```
 
 (customising_panels)=
+
 ## Panel customisation
 
 By adding extra parameters to your panel/field definitions, you can control much of how your fields will display in the Wagtail page editing interface. Wagtail's page editing interface takes much of its behaviour from Django's admin, so you may find many options for customisation covered there.
 (See [Django model field reference](django:ref/models/fields)).
 
 (customising_panel_icons)=
+
 ### Icons
 
 Use the `icon` argument to the panel constructor to override the icon to be displayed next to the panel's heading. For a list of available icons, see [](available_icons).
 
 ### Heading
 
-Use the `heading` argument to the panel constructor to set the panel's heading. This will be used for the input's label and displayed on the content minimap. If left unset for `FieldPanel`s, it will be set automatically using the form field's label (taken in turn from a model field's ``verbose_name``).
+Use the `heading` argument to the panel constructor to set the panel's heading. This will be used for the input's label and displayed on the content minimap. If left unset for `FieldPanel`s, it will be set automatically using the form field's label (taken in turn from a model field's `verbose_name`).
 
 ### CSS classes
 
@@ -263,9 +268,9 @@ Use the `help_text` argument to the panel constructor to customise the help text
 
 ### Placeholder text
 
-By default, Wagtail uses the field's label as placeholder text. To change it, pass to the ``FieldPanel`` a widget with a placeholder attribute set to your desired text. You can select widgets from [Django's form widgets](django:ref/forms/widgets), or any of the Wagtail's widgets found in `wagtail.admin.widgets`.
+By default, Wagtail uses the field's label as placeholder text. To change it, pass to the `FieldPanel` a widget with a placeholder attribute set to your desired text. You can select widgets from [Django's form widgets](django:ref/forms/widgets), or any of the Wagtail's widgets found in `wagtail.admin.widgets`.
 
-For example, to customise placeholders for a ``Book`` snippet model:
+For example, to customise placeholders for a `Book` snippet model:
 
 ```python
 # models.py
@@ -303,4 +308,4 @@ To make input or chooser selection mandatory for a field, add [`blank=False`](dj
 
 ### Hiding fields
 
-Without a top-level panel definition, a ``FieldPanel`` will be constructed for each field in your model. If you intend to hide a field on the Wagtail page editor, define the field with [`editable=False`](django.db.models.Field.editable). If a field is not present in the panels definition, it will also be hidden.
+Without a top-level panel definition, a `FieldPanel` will be constructed for each field in your model. If you intend to hide a field on the Wagtail page editor, define the field with [`editable=False`](django.db.models.Field.editable). If a field is not present in the panels definition, it will also be hidden.

+ 2 - 2
docs/topics/images.md

@@ -451,7 +451,7 @@ When including SVG images in templates via the `image` tag, they will be rendere
 
 If a user navigates directly to the URL of the SVG file embedded scripts may be executed, depending on server/storage configuration. This can be mitigated by setting appropriate Content-Security-Policy or Content-Disposition headers for SVG responses:
 
-- setting `Content-Security-Policy: default-src 'none'` will prevent scripts from being loaded or executed (as well as other resources - a more relaxed policy of `script-src 'none'` may also be suitable); and
-- setting `Content-Disposition: attachment` will cause the file to be downloaded rather than being immediately rendered in the browser, meaning scripts will not be executed (note: this will not prevent scripts from running if a user downloads and subsequently opens the SVG file in their browser).
+-   setting `Content-Security-Policy: default-src 'none'` will prevent scripts from being loaded or executed (as well as other resources - a more relaxed policy of `script-src 'none'` may also be suitable); and
+-   setting `Content-Disposition: attachment` will cause the file to be downloaded rather than being immediately rendered in the browser, meaning scripts will not be executed (note: this will not prevent scripts from running if a user downloads and subsequently opens the SVG file in their browser).
 
 The steps required to set headers for specific responses will vary, depending on how your Wagtail application is deployed.

+ 6 - 6
docs/topics/snippets/customising.md

@@ -105,12 +105,12 @@ So, to override the template used by the `IndexView` for example, you could crea
 
 For some common views, Wagtail also allows you to override the template used by either specifying the `{view_name}_template_name` attribute or overriding the `get_{view_name}_template()` method on the viewset. The following is a list of customisation points for the views:
 
-- `IndexView`: `index.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.index_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_index_template()`
-  - For the results fragment used in AJAX responses (e.g. when searching), customise `index_results.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.index_results_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_index_results_template()`.
-- `CreateView`: `create.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.create_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_create_template()`
-- `EditView`: `edit.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.edit_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_edit_template()`
-- `DeleteView`: `delete.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.delete_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_delete_template()`
-- `HistoryView`: `history.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.history_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_history_template()`
+-   `IndexView`: `index.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.index_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_index_template()`
+    -   For the results fragment used in AJAX responses (e.g. when searching), customise `index_results.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.index_results_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_index_results_template()`.
+-   `CreateView`: `create.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.create_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_create_template()`
+-   `EditView`: `edit.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.edit_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_edit_template()`
+-   `DeleteView`: `delete.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.delete_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_delete_template()`
+-   `HistoryView`: `history.html`, {attr}`~wagtail.snippets.views.snippets.SnippetViewSet.history_template_name`, or {meth}`~wagtail.snippets.views.snippets.SnippetViewSet.get_history_template()`
 
 ## Menu item
 

+ 0 - 1
docs/topics/snippets/features.md

@@ -353,7 +353,6 @@ The [documentation on tagging pages](tagging) has more information on how to use
 
 Similar to pages, you can nest other models within a snippet.
 
-
 ```python
 from django.db import models
 from modelcluster.fields import ParentalKey