Setting Up Google News Sitemap Feed with Outbound Feeds
The Google News Sitemap feed uses the sitemap-news block which is an out-of-the-box template that uses custom fields to quickly and easily set up, configure and manage your feed.
Feed Setup
The Google News Sitemap feed is a platform level Arc feed block with configurable and customizable parameters. It contains a news tag that was created by Google to provide additional information about each article.
Steps to configure the Google News Sitemap feed.
Sitemap Configuration
Featured Media
1. ANS Image Title Key
ANS field to get the image title from promo_items.basic
.
default: title
2. ANS Image Caption Key
ANS field to get the image caption from promo_items.basic
.
default: caption
3. Include Promo Items
Used to determine whether to include promo_items
in the sitemap or not. True/False
default: true
4. Path to promo_items
ANS field to use for the featured media, supports a JMESPath statement.
default: promo_items.basic
|| promo_items.lead_art
5. Image height and or width
A set of key value pairs where you can set an integer height and or width to resize all images. Zero means no resizing will be performed.
default: height: 0
, width: 0
Field Mapping
1. Publication Name
Name to use in the <news:name>
tag. If left blank it will use the environment variable feedTitle from blocks.json.
default: feedTitle
value
2. Language
Language code to use in the <news:language>
tag. If left blank it will use the environment variable feedLanguage from blocks.json. Use Exclude to remove this tag.
default: feedTitle
value
3. Article Title
ANS field to be used for the headline.
default: headlines.basic
4. Keywords
ANS field to be used for keywords.
Select one: taxonomy.seo_keywords
or taxonomy.tags.text
default: seo_keywords
Format
1. Last Modified Date
ANS date field
Select one: created_date
, display_date
, first_publish_date
, last_updated_date
, or publish_date
.
default: last_updated_date
2. Priority
Sitemap priority is a hint to the consumer of how important these links are in the website.
Select one: numbers from 0.0
to 1.0
default: 0.5
3. Change Frequency
Denotes the suggested frequency bots should revisit the sitemap for updates.
Select one: always, hourly, daily, weekly, monthly, yearly, never, Exclude field
default: always
Resolver Configuration
Each feed template needs to have a resolver applied. To Create A Resolver, you’ll want to configure these fields.
1. Resolver Name
Unique name given to the resolver, for example sitemap-news
2. Resolver Priority
Number to indicate priority order (1 to 100). Lower numbers are evaluated first.
3. Regex Pattern
^/arc/outboundfeeds/sitemap-news/?$^/arc/outboundfeeds/sitemap-news/category/(.*)/?$|^/arc/outboundfeeds/sitemap-news/author/(.*)/?$|^/arc/outboundfeeds/sitemap-news/keyword/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags_slug/(.*)/?$
4. URL Parameters
5. Websites
all
6. Content Source
feeds-content-api
There are also optional content sources available out-of-the-box, details Here.
7. Patterns
These positions come from the regex pattern. There are a number of ways to pass a section (or author, keyword or tag) to the content source from the resolver. All of them use a grouping () in the regex.
Section - Pattern 1
^/arc/outboundfeeds/sitemap-news/?$^/arc/outboundfeeds/sitemap-news/category/(.*)/?$|^/arc/outboundfeeds/sitemap-news/author/(.*)/?$|^/arc/outboundfeeds/sitemap-news/keyword/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags_slug/(.*)/?$
Author - Pattern 2
^/arc/outboundfeeds/sitemap-news/?$^/arc/outboundfeeds/sitemap-news/category/(.*)/?$|^/arc/outboundfeeds/sitemap-news/author/(.*)/?$|^/arc/outboundfeeds/sitemap-news/keyword/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags_slug/(.*)/?$
Keywords - Pattern 3
^/arc/outboundfeeds/sitemap-news/?$^/arc/outboundfeeds/sitemap-news/category/(.*)/?$|^/arc/outboundfeeds/sitemap-news/author/(.*)/?$|^/arc/outboundfeeds/sitemap-news/keyword/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags_slug/(.*)/?$
Tags - Text - Pattern 4
^/arc/outboundfeeds/sitemap-news/?$^/arc/outboundfeeds/sitemap-news/category/(.*)/?$|^/arc/outboundfeeds/sitemap-news/author/(.*)/?$|^/arc/outboundfeeds/sitemap-news/keyword/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags_slug/(.*)/?$
Tags - Slug - Pattern 5
^/arc/outboundfeeds/sitemap-news/?$^/arc/outboundfeeds/sitemap-news/category/(.*)/?$|^/arc/outboundfeeds/sitemap-news/author/(.*)/?$|^/arc/outboundfeeds/sitemap-news/keyword/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags/(.*)/?$|^/arc/outboundfeeds/sitemap-news/tags_slug/(.*)/?$
Include - Terms
Modify the query used by the content source. More information on queries can be found Here.
Exclude - Terms
Modify the query used by the content source. More information on queries can be found Here.
Exclude - Sections
You can enter a comma separated list of sections to exclude. For example /premium
,/paid-content
.
Feed - Size
Integer 1 to 100. Defaults to 100
. If you added a size URL parameter, select the parameter option and select size and enter a default value.
Feed - Offset
Integer. Defaults to 0
. If you added a from URL parameter, select the parameter option and select from and enter a default value.
Sort - last\updated\date:desc
If left blank it will default to publish_date:desc
. The date field you selected to display for the Last Modified Date is the date you should enter here. The format is date_field
+ ":"
+ sort order (desc or asc)
. Valid date fields are created_date
, display_date
, first_publish_date
, last_updated_date
, or publish_date
.
Source - Exclude - A comma separated list of ANS fields to remove from the default list of ANS fields. See the default list Here
Source- Include - A comma separated list of ANS fields to add to the default list of ANS fields. See the default list Here
Include - Distributor - Name
If you only want content from a single distributor, enter the name here. You may only populate one distributor field.
Exclude - Distributor - Name
If you want to exclude content from a single distributor, enter the name here. You may only populate one distributor field.
Include - Distributor - Category
If you only want content from a single distributor category, enter the name here. You may only populate one distributor field.
Exclude - Distributor - Category
If you want to exclude content from a single distributor category, enter the name here. You may only populate one distributor field.
8. Default Template
Select the template you just created news-sitemap-feed
to use with this resolver.
9. Default output type
Select xml
.
10. Content Mapped Template
blank
Google News Sitemap URL
To preview your Google News Sitemap XML, modify the URL below with the your client org and website name.
https://outboundfeeds.CLIENTORG.arcpublishing.com/pf/arc/outboundfeeds/sitemap-news/?_website=CLIENTWEBSITE NAME
Additional Information
All sitemaps adhere to the Standard Sitemap Protocol and implement Google’s extensions for both Images and Videos.
- Steps to create and manage Outbound Feeds.
- Optional Content Sources For OBF.
- Using Jmespath To Map To CustomFields ANS Values.
- More details on Resolvers.
- Regex Debugger.