- πΊπΈUnited States Coop920
Any updates on this? Having the same issue. Thanks
- π¨π¦Canada mparker17 UTC-4
Hey everyone! I'm a volunteer maintainer of this module. I think this is a great idea and would make a great addition to the sitemap module's features!
But, I don't have any experience integrating modules with the Metatag module; and the D7 site_map issue referenced in comment #3 β doesn't contain any code that I could learn from, so I don't really know what a solution to this looks like right now. Further, my employer/client doesn't need this feature, and I've been spending most of my volunteer hours on a complex D7 to D10 migration for a friend's website. Unfortunately, all of these things mean that I cannot guarantee that I will have free time to work on this feature request in the near future.
That being said, if yourself (or someone you hire β ) submits a merge request β or patch β to add this feature, I would be very happy to review it and merge it when it is ready!
Alternately, I am available to hire through my company, Consensus Enterprises β - hiring me to add this feature will guarantee that I have the time to work on it. If you'd like to explore this route, please contact Consensus through the contact form on our website.
- π¨π¦Canada mparker17 UTC-4
Moving to the 8.x-2.x branch, because the 8.x-1.x branch is no longer supported.
- π―π΅Japan tom konda Kanagawa, Japan
I think custom meta description to the sitemap.page route can output as following steps.
So no need to develop for SiteMapSettingsForm.- Enable "Metatag Custom Routes" module which is a submodule of Metatag
- Go to /admin/config/search/metatag/custom/create
- Fill "/sitemap" to the Route / Path item and submit form
- Click edit button on /sitemap from Metatag defaults list, and edit default meta tags
- Save default meta tags and go to /sitemap
- Custom metatags are output
I can confirm that tricks works, but as it is not so straightforward; it is maybe a good idea to document this on a very visible location?
Or maybe the Sitemap module can require this submodule if Metatag is detected and then automatically create the /sitemap route?
- π―π΅Japan tom konda Kanagawa, Japan
I thought LGTM, and created submodule "sitemap_metatag" as PoC.
If this submodule is enabled, metatag settings for the sitemap page is added to metatag list. - π¨π¦Canada mparker17 UTC-4
I like @tom konda's approach, i.e.: with the
sitemap_metatag
submodule providing default configuration when installed!I think it would be good to add tests though. Tests ensure that future changes to the module by other contributors will not break the functionality that your site depends on.
I think we could add tests by...
- Adding
"drupal/metatag": "^2",
tocomposer.json
's"require-dev"
section - Adding a file
modules/sitemap_metatag/tests/src/Functional/SitemapMetatagTest.php
, which visits the sitemap and checks that the page text contains the correct values in thecanonical_url
metatag andtitle
tag. You might find the documentation on Creating Functional tests β helpful.
I am happy to assist with writing tests, if you'd like!
- Adding