From d9f038ffcac18c5f540d99d1aa7ed1b14ee294be Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 23 May 2025 09:52:34 +0100 Subject: [PATCH] Add the podcast episode content type --- ..._override.node.podcast_episode.promote.yml | 22 ++++ ...isplay.media.podcast_recording.default.yml | 60 ++++++++++ ....media.podcast_recording.media_library.yml | 27 +++++ ...m_display.node.podcast_episode.default.yml | 110 ++++++++++++++++++ ...isplay.media.podcast_recording.default.yml | 30 +++++ ....media.podcast_recording.media_library.yml | 32 +++++ ...w_display.node.podcast_episode.default.yml | 38 ++++++ ...ew_display.node.podcast_episode.teaser.yml | 36 ++++++ ...dcast_recording.field_media_audio_file.yml | 27 +++++ .../field.field.node.podcast_episode.body.yml | 26 +++++ ...e.podcast_episode.field_episode_number.yml | 23 ++++ ...odcast_episode.field_episode_recording.yml | 29 +++++ ...e.podcast_episode.field_podcast_guests.yml | 29 +++++ ...d.storage.media.field_media_audio_file.yml | 23 ++++ ...ield.storage.node.field_episode_number.yml | 20 ++++ ...d.storage.node.field_episode_recording.yml | 20 ++++ ...ield.storage.node.field_podcast_guests.yml | 20 ++++ config/sync/media.type.podcast_recording.yml | 13 +++ config/sync/node.type.podcast_episode.yml | 17 +++ .../pathauto.pattern.podcast_episode_node.yml | 22 ++++ .../taxonomy.vocabulary.podcast_guest.yml | 9 ++ todo.txt | 2 + 22 files changed, 635 insertions(+) create mode 100644 config/sync/core.base_field_override.node.podcast_episode.promote.yml create mode 100644 config/sync/core.entity_form_display.media.podcast_recording.default.yml create mode 100644 config/sync/core.entity_form_display.media.podcast_recording.media_library.yml create mode 100644 config/sync/core.entity_form_display.node.podcast_episode.default.yml create mode 100644 config/sync/core.entity_view_display.media.podcast_recording.default.yml create mode 100644 config/sync/core.entity_view_display.media.podcast_recording.media_library.yml create mode 100644 config/sync/core.entity_view_display.node.podcast_episode.default.yml create mode 100644 config/sync/core.entity_view_display.node.podcast_episode.teaser.yml create mode 100644 config/sync/field.field.media.podcast_recording.field_media_audio_file.yml create mode 100644 config/sync/field.field.node.podcast_episode.body.yml create mode 100644 config/sync/field.field.node.podcast_episode.field_episode_number.yml create mode 100644 config/sync/field.field.node.podcast_episode.field_episode_recording.yml create mode 100644 config/sync/field.field.node.podcast_episode.field_podcast_guests.yml create mode 100644 config/sync/field.storage.media.field_media_audio_file.yml create mode 100644 config/sync/field.storage.node.field_episode_number.yml create mode 100644 config/sync/field.storage.node.field_episode_recording.yml create mode 100644 config/sync/field.storage.node.field_podcast_guests.yml create mode 100644 config/sync/media.type.podcast_recording.yml create mode 100644 config/sync/node.type.podcast_episode.yml create mode 100644 config/sync/pathauto.pattern.podcast_episode_node.yml create mode 100644 config/sync/taxonomy.vocabulary.podcast_guest.yml diff --git a/config/sync/core.base_field_override.node.podcast_episode.promote.yml b/config/sync/core.base_field_override.node.podcast_episode.promote.yml new file mode 100644 index 000000000..5f3749f33 --- /dev/null +++ b/config/sync/core.base_field_override.node.podcast_episode.promote.yml @@ -0,0 +1,22 @@ +uuid: da2b4a0c-5fc1-4003-9a41-e6e598e3e2bf +langcode: en +status: true +dependencies: + config: + - node.type.podcast_episode +id: node.podcast_episode.promote +field_name: promote +entity_type: node +bundle: podcast_episode +label: 'Promoted to front page' +description: '' +required: false +translatable: true +default_value: + - + value: 0 +default_value_callback: '' +settings: + on_label: 'On' + off_label: 'Off' +field_type: boolean diff --git a/config/sync/core.entity_form_display.media.podcast_recording.default.yml b/config/sync/core.entity_form_display.media.podcast_recording.default.yml new file mode 100644 index 000000000..83960ce7a --- /dev/null +++ b/config/sync/core.entity_form_display.media.podcast_recording.default.yml @@ -0,0 +1,60 @@ +uuid: 3a408fca-9414-4982-902a-5735309d9cac +langcode: en +status: true +dependencies: + config: + - field.field.media.podcast_recording.field_media_audio_file + - media.type.podcast_recording + module: + - file + - path +id: media.podcast_recording.default +targetEntityType: media +bundle: podcast_recording +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_media_audio_file: + type: file_generic + weight: 0 + region: content + settings: + progress_indicator: throbber + third_party_settings: { } + name: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + weight: 100 + region: content + settings: + display_label: true + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } +hidden: { } diff --git a/config/sync/core.entity_form_display.media.podcast_recording.media_library.yml b/config/sync/core.entity_form_display.media.podcast_recording.media_library.yml new file mode 100644 index 000000000..835fc4499 --- /dev/null +++ b/config/sync/core.entity_form_display.media.podcast_recording.media_library.yml @@ -0,0 +1,27 @@ +uuid: a9050af9-e59d-4c69-b6dd-e631faf10574 +langcode: en +status: true +dependencies: + config: + - core.entity_form_mode.media.media_library + - field.field.media.podcast_recording.field_media_audio_file + - media.type.podcast_recording +id: media.podcast_recording.media_library +targetEntityType: media +bundle: podcast_recording +mode: media_library +content: + name: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } +hidden: + created: true + field_media_audio_file: true + path: true + status: true + uid: true diff --git a/config/sync/core.entity_form_display.node.podcast_episode.default.yml b/config/sync/core.entity_form_display.node.podcast_episode.default.yml new file mode 100644 index 000000000..00a64ec8e --- /dev/null +++ b/config/sync/core.entity_form_display.node.podcast_episode.default.yml @@ -0,0 +1,110 @@ +uuid: 64df3284-e9fd-41c2-b59e-e6d256a1308f +langcode: en +status: true +dependencies: + config: + - field.field.node.podcast_episode.body + - field.field.node.podcast_episode.field_episode_number + - field.field.node.podcast_episode.field_episode_recording + - field.field.node.podcast_episode.field_podcast_guests + - node.type.podcast_episode + module: + - media_library + - path + - text +id: node.podcast_episode.default +targetEntityType: node +bundle: podcast_episode +mode: default +content: + body: + type: text_textarea_with_summary + weight: 2 + region: content + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + show_summary: false + third_party_settings: { } + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_episode_number: + type: number + weight: 122 + region: content + settings: + placeholder: '' + third_party_settings: { } + field_episode_recording: + type: media_library_widget + weight: 121 + region: content + settings: + media_types: { } + third_party_settings: { } + field_podcast_guests: + type: entity_reference_autocomplete + weight: 123 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + weight: 15 + region: content + settings: + display_label: true + third_party_settings: { } + simple_sitemap: + weight: 10 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + weight: 120 + region: content + settings: + display_label: true + third_party_settings: { } + sticky: + type: boolean_checkbox + weight: 16 + region: content + settings: + display_label: true + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } +hidden: { } diff --git a/config/sync/core.entity_view_display.media.podcast_recording.default.yml b/config/sync/core.entity_view_display.media.podcast_recording.default.yml new file mode 100644 index 000000000..c351ae42b --- /dev/null +++ b/config/sync/core.entity_view_display.media.podcast_recording.default.yml @@ -0,0 +1,30 @@ +uuid: 3e04767f-3d30-419d-a12a-2e6425e92f11 +langcode: en +status: true +dependencies: + config: + - field.field.media.podcast_recording.field_media_audio_file + - media.type.podcast_recording + module: + - file +id: media.podcast_recording.default +targetEntityType: media +bundle: podcast_recording +mode: default +content: + field_media_audio_file: + type: file_audio + label: visually_hidden + settings: + controls: true + autoplay: false + loop: false + multiple_file_display_type: tags + third_party_settings: { } + weight: 0 + region: content +hidden: + created: true + name: true + thumbnail: true + uid: true diff --git a/config/sync/core.entity_view_display.media.podcast_recording.media_library.yml b/config/sync/core.entity_view_display.media.podcast_recording.media_library.yml new file mode 100644 index 000000000..61a7e5b77 --- /dev/null +++ b/config/sync/core.entity_view_display.media.podcast_recording.media_library.yml @@ -0,0 +1,32 @@ +uuid: 0ca77936-0041-4ffc-8b34-3a159442c584 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.media.media_library + - field.field.media.podcast_recording.field_media_audio_file + - image.style.medium + - media.type.podcast_recording + module: + - image +id: media.podcast_recording.media_library +targetEntityType: media +bundle: podcast_recording +mode: media_library +content: + thumbnail: + type: image + label: hidden + settings: + image_link: '' + image_style: medium + image_loading: + attribute: lazy + third_party_settings: { } + weight: 0 + region: content +hidden: + created: true + field_media_audio_file: true + name: true + uid: true diff --git a/config/sync/core.entity_view_display.node.podcast_episode.default.yml b/config/sync/core.entity_view_display.node.podcast_episode.default.yml new file mode 100644 index 000000000..38e1a802d --- /dev/null +++ b/config/sync/core.entity_view_display.node.podcast_episode.default.yml @@ -0,0 +1,38 @@ +uuid: 0a1c86a1-9a0b-4762-b250-47b26e69fee3 +langcode: en +status: true +dependencies: + config: + - field.field.node.podcast_episode.body + - field.field.node.podcast_episode.field_episode_number + - field.field.node.podcast_episode.field_episode_recording + - field.field.node.podcast_episode.field_podcast_guests + - node.type.podcast_episode + module: + - text + - user +id: node.podcast_episode.default +targetEntityType: node +bundle: podcast_episode +mode: default +content: + body: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 1 + region: content + field_episode_recording: + type: entity_reference_entity_view + label: hidden + settings: + view_mode: default + link: true + third_party_settings: { } + weight: 0 + region: content +hidden: + field_episode_number: true + field_podcast_guests: true + links: true diff --git a/config/sync/core.entity_view_display.node.podcast_episode.teaser.yml b/config/sync/core.entity_view_display.node.podcast_episode.teaser.yml new file mode 100644 index 000000000..642cf22f8 --- /dev/null +++ b/config/sync/core.entity_view_display.node.podcast_episode.teaser.yml @@ -0,0 +1,36 @@ +uuid: 44a6098e-70f3-4b60-bb80-22dd4e06334b +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.podcast_episode.body + - field.field.node.podcast_episode.field_episode_number + - field.field.node.podcast_episode.field_episode_recording + - field.field.node.podcast_episode.field_podcast_guests + - node.type.podcast_episode + module: + - text + - user +id: node.podcast_episode.teaser +targetEntityType: node +bundle: podcast_episode +mode: teaser +content: + body: + type: text_summary_or_trimmed + label: hidden + settings: + trim_length: 600 + third_party_settings: { } + weight: 0 + region: content + links: + settings: { } + third_party_settings: { } + weight: 100 + region: content +hidden: + field_episode_number: true + field_episode_recording: true + field_podcast_guests: true diff --git a/config/sync/field.field.media.podcast_recording.field_media_audio_file.yml b/config/sync/field.field.media.podcast_recording.field_media_audio_file.yml new file mode 100644 index 000000000..30d6c601b --- /dev/null +++ b/config/sync/field.field.media.podcast_recording.field_media_audio_file.yml @@ -0,0 +1,27 @@ +uuid: e2813f92-094b-4cf0-97d7-b11c7b592727 +langcode: en +status: true +dependencies: + config: + - field.storage.media.field_media_audio_file + - media.type.podcast_recording + module: + - file +id: media.podcast_recording.field_media_audio_file +field_name: field_media_audio_file +entity_type: media +bundle: podcast_recording +label: 'Audio file' +description: '' +required: true +translatable: true +default_value: { } +default_value_callback: '' +settings: + handler: 'default:file' + handler_settings: { } + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'mp3 wav aac' + max_filesize: '' + description_field: false +field_type: file diff --git a/config/sync/field.field.node.podcast_episode.body.yml b/config/sync/field.field.node.podcast_episode.body.yml new file mode 100644 index 000000000..d22f07479 --- /dev/null +++ b/config/sync/field.field.node.podcast_episode.body.yml @@ -0,0 +1,26 @@ +uuid: 9d5023be-4179-4eeb-8fa3-677ff8e24f60 +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - filter.format.markdown + - node.type.podcast_episode + module: + - text +id: node.podcast_episode.body +field_name: body +entity_type: node +bundle: podcast_episode +label: Body +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + display_summary: true + required_summary: false + allowed_formats: + - markdown +field_type: text_with_summary diff --git a/config/sync/field.field.node.podcast_episode.field_episode_number.yml b/config/sync/field.field.node.podcast_episode.field_episode_number.yml new file mode 100644 index 000000000..20cd3ffc2 --- /dev/null +++ b/config/sync/field.field.node.podcast_episode.field_episode_number.yml @@ -0,0 +1,23 @@ +uuid: 1ecded4d-c34b-4125-957f-14f903ef11c8 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_episode_number + - node.type.podcast_episode +id: node.podcast_episode.field_episode_number +field_name: field_episode_number +entity_type: node +bundle: podcast_episode +label: 'Episode number' +description: '' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: + min: 1 + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/config/sync/field.field.node.podcast_episode.field_episode_recording.yml b/config/sync/field.field.node.podcast_episode.field_episode_recording.yml new file mode 100644 index 000000000..c59a2f282 --- /dev/null +++ b/config/sync/field.field.node.podcast_episode.field_episode_recording.yml @@ -0,0 +1,29 @@ +uuid: 6ca18148-8940-4508-848d-1dc2ced26dd4 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_episode_recording + - media.type.podcast_recording + - node.type.podcast_episode +id: node.podcast_episode.field_episode_recording +field_name: field_episode_recording +entity_type: node +bundle: podcast_episode +label: 'Episode recording' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:media' + handler_settings: + target_bundles: + podcast_recording: podcast_recording + sort: + field: _none + direction: ASC + auto_create: false + auto_create_bundle: image +field_type: entity_reference diff --git a/config/sync/field.field.node.podcast_episode.field_podcast_guests.yml b/config/sync/field.field.node.podcast_episode.field_podcast_guests.yml new file mode 100644 index 000000000..65823e949 --- /dev/null +++ b/config/sync/field.field.node.podcast_episode.field_podcast_guests.yml @@ -0,0 +1,29 @@ +uuid: cc5316ab-8001-45d3-b086-b606539fafd1 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_podcast_guests + - node.type.podcast_episode + - taxonomy.vocabulary.podcast_guest +id: node.podcast_episode.field_podcast_guests +field_name: field_podcast_guests +entity_type: node +bundle: podcast_episode +label: Guests +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + podcast_guest: podcast_guest + sort: + field: name + direction: asc + auto_create: true + auto_create_bundle: '' +field_type: entity_reference diff --git a/config/sync/field.storage.media.field_media_audio_file.yml b/config/sync/field.storage.media.field_media_audio_file.yml new file mode 100644 index 000000000..dfd88f43a --- /dev/null +++ b/config/sync/field.storage.media.field_media_audio_file.yml @@ -0,0 +1,23 @@ +uuid: 37b307af-dcc2-49f5-aa19-a20cf0947193 +langcode: en +status: true +dependencies: + module: + - file + - media +id: media.field_media_audio_file +field_name: field_media_audio_file +entity_type: media +type: file +settings: + target_type: file + display_field: false + display_default: false + uri_scheme: public +module: file +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_episode_number.yml b/config/sync/field.storage.node.field_episode_number.yml new file mode 100644 index 000000000..09d1d2092 --- /dev/null +++ b/config/sync/field.storage.node.field_episode_number.yml @@ -0,0 +1,20 @@ +uuid: 50ebac22-3bef-4041-bb4a-50339d3e38fc +langcode: en +status: true +dependencies: + module: + - node +id: node.field_episode_number +field_name: field_episode_number +entity_type: node +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_episode_recording.yml b/config/sync/field.storage.node.field_episode_recording.yml new file mode 100644 index 000000000..696250118 --- /dev/null +++ b/config/sync/field.storage.node.field_episode_recording.yml @@ -0,0 +1,20 @@ +uuid: 2324084f-bde7-4d43-b06f-8c38ccad15c1 +langcode: en +status: true +dependencies: + module: + - media + - node +id: node.field_episode_recording +field_name: field_episode_recording +entity_type: node +type: entity_reference +settings: + target_type: media +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_podcast_guests.yml b/config/sync/field.storage.node.field_podcast_guests.yml new file mode 100644 index 000000000..b4c500bc6 --- /dev/null +++ b/config/sync/field.storage.node.field_podcast_guests.yml @@ -0,0 +1,20 @@ +uuid: a0047886-e225-49a5-9202-a7c5a699d9fd +langcode: en +status: true +dependencies: + module: + - node + - taxonomy +id: node.field_podcast_guests +field_name: field_podcast_guests +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/media.type.podcast_recording.yml b/config/sync/media.type.podcast_recording.yml new file mode 100644 index 000000000..93becdbac --- /dev/null +++ b/config/sync/media.type.podcast_recording.yml @@ -0,0 +1,13 @@ +uuid: 5062a30a-b8ca-4c09-ba3f-6fcffdbba5a8 +langcode: en +status: true +dependencies: { } +id: podcast_recording +label: 'Podcast recording' +description: '' +source: audio_file +queue_thumbnail_downloads: false +new_revision: true +source_configuration: + source_field: field_media_audio_file +field_map: { } diff --git a/config/sync/node.type.podcast_episode.yml b/config/sync/node.type.podcast_episode.yml new file mode 100644 index 000000000..8fafb138c --- /dev/null +++ b/config/sync/node.type.podcast_episode.yml @@ -0,0 +1,17 @@ +uuid: 16bebf21-bc78-4888-8d24-9919010c219f +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: { } + parent: '' +name: 'Podcast episode' +type: podcast_episode +description: null +help: null +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/config/sync/pathauto.pattern.podcast_episode_node.yml b/config/sync/pathauto.pattern.podcast_episode_node.yml new file mode 100644 index 000000000..302e90313 --- /dev/null +++ b/config/sync/pathauto.pattern.podcast_episode_node.yml @@ -0,0 +1,22 @@ +uuid: 1957f4a1-c33c-4fec-9ce4-f4e9b45a8ca7 +langcode: en +status: true +dependencies: + module: + - node +id: podcast_episode_node +label: 'Podcast episode node' +type: 'canonical_entities:node' +pattern: 'podcast/[node:field_episode_number]-[node:title]' +selection_criteria: + 484f01e1-4e5c-4130-bb52-acd3f2c650c9: + id: 'entity_bundle:node' + negate: false + uuid: 484f01e1-4e5c-4130-bb52-acd3f2c650c9 + context_mapping: + node: node + bundles: + podcast_episode: podcast_episode +selection_logic: and +weight: -5 +relationships: { } diff --git a/config/sync/taxonomy.vocabulary.podcast_guest.yml b/config/sync/taxonomy.vocabulary.podcast_guest.yml new file mode 100644 index 000000000..24ac19d73 --- /dev/null +++ b/config/sync/taxonomy.vocabulary.podcast_guest.yml @@ -0,0 +1,9 @@ +uuid: 0a08aca0-ee7f-451f-8a5f-298315b34019 +langcode: en +status: true +dependencies: { } +name: 'Podcast guest' +vid: podcast_guest +description: null +weight: 0 +new_revision: false diff --git a/todo.txt b/todo.txt index ab4dc13d2..7987ed6f7 100644 --- a/todo.txt +++ b/todo.txt @@ -13,6 +13,8 @@ Podcast: - Migrate podcast episodes. - Recreate podcast subscription XML feed. +- Other episodes with the same guests. +- Link field for episode links. Testimonials: