Search code examples
drupaldrupal-8xml-sitemap

Drupal 8 sitemap


Which are the possible way to get an XML sitemap in drupal 8 for image and video?

these are the module which i have tried

  1. Simple XML sitemap:- this is the format for the sitemap XML https://support.google.com/webmasters/answer/178636?hl=en instead i get the format like  it is showing wrong tag and it is showing in media bundle page but i need to get the page where the image or video is used it is showing wrong tag and is showing in media bundle page but i need to get the page where the image or video is used.

Solution

  • Version 2.10 and above of Simple XML sitemap supports indexing of images entities. Don't forget to run /update.php after upgrading. After doing so, there will be a new setting 'include images' on entity type/bundle settings as well as on entity edit pages.

    See this blog post for details.

    Regarding videos, I think using hook_simple_sitemap_arbitrary_links_alter(&$arbitrary_links) would not be enough, as the output of the XML would have to be changed to add the 'video' element. The plan is to make generating of XML more pluggable and extensible in 2.11. Feel free to help out.