Page MenuHomePhabricator

Add Parser function to prevent "dateModified" and "datePublished" from being added
Closed, ResolvedPublicFeature

Description

Feature summary: The option to use a parser function on specific pages to prevent "dateModified" and "datePublished" from being added to application/ld+json.

Screenshot 2022-09-15 190005.png (126×1 px, 25 KB)

Use case: Currently search engines display a date snippet in front of our wiki (rainworld.miraheze.org) result.

storage.png (147×584 px, 15 KB)

I have been advised that search engines pull this information from ld+json, and that removing "dateModified" and "datePublished" from specific pages should prevent the date snippet from appearing in search results.
Trying to set these two fields as blank using {{SEO:|published_time=-}} or {{SEO:|modified_time=-}} does not seem to have an effect; I have been informed that modified_time is automatically set.

Issues and Benefits:

Showing the date a relatively static main page was last modified can give the average visitor the impression that the wiki is out of date. It is also superfluous for main pages intended as landing pages and resource hubs, and takes up a small amount of space in the result description.
Implementing this feature would give teams the option of removing date snippets on a per-page basis where deemed superfluous, and therefore present neater search engine results for their wikis.

Example of wiki result without date to show desired outcome:

unknown2 (121×623 px, 15 KB)

Kind regards,

Event Timeline

Restricted Application added subscribers: Reception123, Aklapper. · View Herald Transcript

Sorry, I've forgot to subscribe to the project! :(

This should be implemented in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikiSEO/+/863438
When using {{#seo:|modified_time=-}}, the modified time is no longer set automatically.

Aklapper renamed this task from Parser function requested for Extension:WikiSEO to Add Parser function to prevent "dateModified" and "datePublished" from being added.Dec 3 2022, 2:27 PM
Aklapper closed this task as Resolved.
Aklapper assigned this task to Octfx.

resolving per last comment