User:CFloyd (WMF)/Feed Markup Documentation

About this page
This page documents how to organize and markup content in a Wikipedia project so that it can be included in the Feed APIs. These APIs are provided by the Mobile Content Service and are used primarily by the Android and iOS Apps to display various types of content from Wikipedia. This content includes:
 * Today's featured article
 * Wikipedia Commons picture of the day
 * "In the news" stories
 * Most viewed articles

Two more types of content are currently in development:
 * On this day Anniversaries
 * Trending edited articles

What content requires markup?
Project specific curated content requires markup for the Mobile Content Service to ingest. This includes:
 * Today's featured article
 * "In the news" stories
 * On this day Anniversaries

Why should I mark up content?
Currently, the Mobile Content Service works for a limited number of projects and for a limited number of content types. By marking up the content of a project wiki you can enable your curated content to be served to a greater number of users through the Feed APIs, specifically mobile users of the iOS and Android apps.

How do I mark up content?
It should be noted that you do not need to mark up content that you wish to include in the feed. All wikis are slightly different. You can choose to only mark up the Today's featured article for your Wiki and not mark up On this day. This is entirely up to the project maintainers.

Today's featured article
Today's featured article of the day is a common type of content displayed on the Main Page of many Wikis. You can see the English version on the Main Page here:

https://en.wikipedia.org/wiki/Main_Page

Location
Today's featured article content must be located on the Main Page of a project. The Main Page of the project must be included on the Main Page Wikidata Item here:

https://www.wikidata.org/wiki/Q5296

Markup
To make Today's featured article visible to the Mobile Content Service, you must add several HTML classes to the HTML of your Main Page.

In the news
In the news articles are created and curated on the Current events portal by many project maintainers. Additionally, they are frequently transcluded on the Main Page of many Wikis. You can see In the news on both the English version of the Main Page and on the Current events portal:

https://en.wikipedia.org/wiki/Main_Page

https://en.wikipedia.org/wiki/Portal:Current_events

Location
In the news content must be located on the Current events portal of a project. The Current events portal must be included on the Current events portal Wikidata Item here:

https://www.wikidata.org/wiki/Q4597488

Markup
To make 'In the news' content visible to the Mobile Content Service, you must add several HTML classes to the HTML of your Current events portal.

On this day
On this day anniversaries show curated events on specific days of the year and come in 2 varieties.

Day Page Anniversaries
Day page anniversaries are listed for each specific day of the year. These pages contain a large list of anniversaries of varying significance and exist for each day of the year. They are usually grouped by type (such as "Event" and "Birth"). You can see an example here on English Wikipedia:

https://en.wikipedia.org/wiki/December_20

Location
Day page anniversaries content must be located on a day page that is associated with the proper Wikidata item for that day. For instance, the English December 20th page here:

https://en.wikipedia.org/wiki/December_20

Is linked to the Wikidata Item for that date here:

https://www.wikidata.org/wiki/Q2636

Markup
To make Day page content visible to the Mobile Content Service, you must add several HTML classes to the HTML of each day page:

Selected Anniversaries
Selected anniversaries are a subset of curated anniversaries. They are similar to the "Day Page Anniversaries" above, but contain a much smaller number of events. You can see an example here on English Wikipedia:

https://en.wikipedia.org/wiki/Wikipedia:Selected_anniversaries/December_20

Location
Selected anniversaries content must be located on a selected anniversary day page that is associated with the proper Wikidata item for that day. For instance, the English December 20th page here:

https://en.wikipedia.org/wiki/Wikipedia:Selected_anniversaries/December_20

Is linked to the Wikidata Item for that date here:

https://www.wikidata.org/wiki/Q5666427

Markup
To make Selected anniversary page content visible to the Mobile Content Service, add the same markup as you would for the Day page anniversaries listed above