Problem/Motivation

We want to support the inclusion of sitemap links for content that lives outside of Drupal, such as in external systems or Single Page Applications (SPAs). These external data sources often cannot be directly integrated into Drupal's content model, but it's still important for their URLs to be discoverable by search engines via the sitemap.

Allowing manually entered XML data provides a flexible way for site administrators to include these external links without requiring complex integrations or automated endpoint traversal.

Proposed resolution

Introduce a new feature that allows users to paste raw XML sitemap content into a configurable text field. The module will then parse the inputted XML and generate sitemap links based on it. This allows teams to manually manage and update external URLs in the sitemap without requiring automated API integration.

Key capabilities would include:

  • A configurable textarea field in the admin UI for pasting raw XML.
  • Parsing logic to extract URLs from the pasted XML.
  • Validation to ensure the XML is well-formed and adheres to the expected sitemap format.
  • Integration with the sitemap generation system to include these links.

Tasks

  • Define expected XML format (e.g., standard sitemap structure).
  • Add admin configuration form with a textarea for XML input.
  • Implement XML parsing and link extraction.
  • Validate and sanitize input.
  • Integrate parsed links into sitemap generation.
  • Add tests and documentation.

User interface changes

  • New textarea input for pasting XML sitemap content in the admin configuration UI.
  • Inline validation and feedback if malformed XML is entered.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

edwardchiapet created an issue. See original summary.

edwardchiapet’s picture

Status: Active » Needs review

jasonawant’s picture

Assigned: edwardchiapet » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.