From 4e2685f47d1e4eb83261758582ad4786438f98b9 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Fri, 23 Jul 2021 17:14:21 +0100 Subject: [PATCH] Add an 'Extending Wagtail' section to the docs --- docs/advanced_topics/customisation/index.rst | 5 ----- .../customisation/page_editing_interface.rst | 6 +++--- docs/advanced_topics/index.rst | 3 --- .../adding_reports.rst | 0 docs/{advanced_topics => extending}/audit_log.rst | 0 .../custom_account_settings.rst | 0 .../custom_tasks.rst | 0 .../customising_group_views.rst | 0 .../extending_draftail.rst | 4 ++-- .../extending_hallo.rst | 0 docs/extending/index.rst | 15 +++++++++++++++ .../rich_text_internals.rst | 0 docs/index.rst | 1 + docs/reference/hooks.rst | 2 +- docs/releases/1.12.rst | 2 +- docs/releases/2.10.rst | 2 +- 16 files changed, 24 insertions(+), 16 deletions(-) rename docs/{advanced_topics => extending}/adding_reports.rst (100%) rename docs/{advanced_topics => extending}/audit_log.rst (100%) rename docs/{advanced_topics/customisation => extending}/custom_account_settings.rst (100%) rename docs/{advanced_topics => extending}/custom_tasks.rst (100%) rename docs/{advanced_topics/customisation => extending}/customising_group_views.rst (100%) rename docs/{advanced_topics/customisation => extending}/extending_draftail.rst (99%) rename docs/{advanced_topics/customisation => extending}/extending_hallo.rst (100%) create mode 100644 docs/extending/index.rst rename docs/{advanced_topics/customisation => extending}/rich_text_internals.rst (100%) diff --git a/docs/advanced_topics/customisation/index.rst b/docs/advanced_topics/customisation/index.rst index b736907260..3cf7f3038a 100644 --- a/docs/advanced_topics/customisation/index.rst +++ b/docs/advanced_topics/customisation/index.rst @@ -6,11 +6,6 @@ Customising Wagtail :maxdepth: 2 page_editing_interface - rich_text_internals - extending_draftail - extending_hallo admin_templates custom_user_models - customising_group_views streamfield_blocks - custom_account_settings diff --git a/docs/advanced_topics/customisation/page_editing_interface.rst b/docs/advanced_topics/customisation/page_editing_interface.rst index 4eb7d30225..1b2262950b 100644 --- a/docs/advanced_topics/customisation/page_editing_interface.rst +++ b/docs/advanced_topics/customisation/page_editing_interface.rst @@ -94,9 +94,9 @@ We have few additional feature identifiers as well. They are not enabled by defa The process for creating new features is described in the following pages: -* :doc:`./rich_text_internals` -* :doc:`./extending_draftail` -* :doc:`./extending_hallo` +* :doc:`../../extending/rich_text_internals` +* :doc:`../../extending/extending_draftail` +* :doc:`../../extending/extending_hallo` .. _rich_text_image_formats: diff --git a/docs/advanced_topics/index.rst b/docs/advanced_topics/index.rst index bc1d4cf891..094be8910f 100644 --- a/docs/advanced_topics/index.rst +++ b/docs/advanced_topics/index.rst @@ -18,9 +18,6 @@ Advanced topics testing api/index amp - adding_reports - custom_tasks - audit_log accessibility_considerations boundblocks_and_values multi_site_multi_instance_multi_tenancy diff --git a/docs/advanced_topics/adding_reports.rst b/docs/extending/adding_reports.rst similarity index 100% rename from docs/advanced_topics/adding_reports.rst rename to docs/extending/adding_reports.rst diff --git a/docs/advanced_topics/audit_log.rst b/docs/extending/audit_log.rst similarity index 100% rename from docs/advanced_topics/audit_log.rst rename to docs/extending/audit_log.rst diff --git a/docs/advanced_topics/customisation/custom_account_settings.rst b/docs/extending/custom_account_settings.rst similarity index 100% rename from docs/advanced_topics/customisation/custom_account_settings.rst rename to docs/extending/custom_account_settings.rst diff --git a/docs/advanced_topics/custom_tasks.rst b/docs/extending/custom_tasks.rst similarity index 100% rename from docs/advanced_topics/custom_tasks.rst rename to docs/extending/custom_tasks.rst diff --git a/docs/advanced_topics/customisation/customising_group_views.rst b/docs/extending/customising_group_views.rst similarity index 100% rename from docs/advanced_topics/customisation/customising_group_views.rst rename to docs/extending/customising_group_views.rst diff --git a/docs/advanced_topics/customisation/extending_draftail.rst b/docs/extending/extending_draftail.rst similarity index 99% rename from docs/advanced_topics/customisation/extending_draftail.rst rename to docs/extending/extending_draftail.rst index 6376e65372..3fda2d1ac9 100644 --- a/docs/advanced_topics/customisation/extending_draftail.rst +++ b/docs/extending/extending_draftail.rst @@ -153,11 +153,11 @@ 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: -.. image:: ../../_static/images/draftail_entity_stock_source.gif +.. image:: ../_static/images/draftail_entity_stock_source.gif 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: -.. image:: ../../_static/images/draftail_entity_stock_rendering.png +.. image:: ../_static/images/draftail_entity_stock_rendering.png In order to achieve this, we start with registering the rich text feature like for inline styles and blocks: diff --git a/docs/advanced_topics/customisation/extending_hallo.rst b/docs/extending/extending_hallo.rst similarity index 100% rename from docs/advanced_topics/customisation/extending_hallo.rst rename to docs/extending/extending_hallo.rst diff --git a/docs/extending/index.rst b/docs/extending/index.rst new file mode 100644 index 0000000000..3e8d2b643a --- /dev/null +++ b/docs/extending/index.rst @@ -0,0 +1,15 @@ +Extending Wagtail +================= + + +.. toctree:: + :maxdepth: 2 + + adding_reports + custom_tasks + audit_log + custom_account_settings + customising_group_views + rich_text_internals + extending_draftail + extending_hallo diff --git a/docs/advanced_topics/customisation/rich_text_internals.rst b/docs/extending/rich_text_internals.rst similarity index 100% rename from docs/advanced_topics/customisation/rich_text_internals.rst rename to docs/extending/rich_text_internals.rst diff --git a/docs/index.rst b/docs/index.rst index bb6854b624..259ef831ed 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -40,6 +40,7 @@ Index getting_started/index topics/index advanced_topics/index + extending/index reference/index support editor_manual/index diff --git a/docs/reference/hooks.rst b/docs/reference/hooks.rst index f1ace51913..1fee452921 100644 --- a/docs/reference/hooks.rst +++ b/docs/reference/hooks.rst @@ -214,7 +214,7 @@ Alternatively, it can also be added to a function. For example, this function is def register_custom_settings_panel(request, user, profile): return CustomSettingsPanel(request, user, profile) -More details about the options that are available can be found at :doc:`/advanced_topics/customisation/custom_account_settings`. +More details about the options that are available can be found at :doc:`/extending/custom_account_settings`. .. _register_account_menu_item: diff --git a/docs/releases/1.12.rst b/docs/releases/1.12.rst index 82ef798c87..e12a20a1c5 100644 --- a/docs/releases/1.12.rst +++ b/docs/releases/1.12.rst @@ -74,7 +74,7 @@ The configuration settings ``WAGTAILEMBEDS_EMBED_FINDER`` and ``WAGTAILEMBEDS_EM Registering custom hallo.js plugins directly is deprecated ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ability to enable / disable ``hallo.js`` plugins by calling ``registerHalloPlugin`` or modifying the ``halloPlugins`` list has been deprecated, and will be removed in Wagtail 1.14. The recommended way of customising the hallo.js editor is now through :ref:`rich text features `. For details of how to define a hallo.js plugin as a rich text feature, see :doc:`../advanced_topics/customisation/extending_hallo`. +The ability to enable / disable ``hallo.js`` plugins by calling ``registerHalloPlugin`` or modifying the ``halloPlugins`` list has been deprecated, and will be removed in Wagtail 1.14. The recommended way of customising the hallo.js editor is now through :ref:`rich text features `. For details of how to define a hallo.js plugin as a rich text feature, see :doc:`../extending/extending_hallo`. Custom ``get_admin_display_title`` methods should use ``draft_title`` diff --git a/docs/releases/2.10.rst b/docs/releases/2.10.rst index 87f3e442f5..86e20164ab 100644 --- a/docs/releases/2.10.rst +++ b/docs/releases/2.10.rst @@ -15,7 +15,7 @@ Moderation workflow This release introduces a configurable moderation workflow system to replace the single-step "submit for moderation" feature. Workflows can be set up on specific subsections of the page tree and consist of any number of tasks to be completed by designated user groups. To support this, numerous UI improvements have been made to Wagtail's page editor, including a new log viewer to track page history. -For further details, see :ref:`managing_workflows` and :doc:`../advanced_topics/custom_tasks`. +For further details, see :ref:`managing_workflows` and :doc:`../extending/custom_tasks`. This feature was developed by Jacob Topp-Mugglestone, Karl Hobley, Matt Westcott and Dan Braghis, and sponsored by `The Motley Fool `_.