Editing the content-type Resource
To create sitemaps for an Escenic
publication, all you need to do is add seo:enabled
elements to the content type definitions in the publication's
content-type
resource. You must add an
seo:enabled
element to each content type for which
you want a sitemap document to be generated.
For general information about the content-type
resource and content type editing, see the Escenic?Content Engine
Resource Reference.
An seo:enabled
element must be added as a child
of a content-type
element, and must belong to the
namespace http://xmlns.escenic.com/2013/seo
:
<content-types ... xmlns:seo="http://xmlns.escenic.com/2013/seo" ...> ... <content-type name="news"> ... <seo:enabled/> ... </content-type> ... </content-types>
If the seo:enabled
element is specified without
a type
attribute as above, then the generated sitemap
document will contain no extension elements.
If you include a type="news"
attribute in a
content type's seo:enabled
element:
<content-types ... xmlns:seo="http://xmlns.escenic.com/2013/seo" ...> ... <content-type name="news"> ... <seo:enabled type="news"/> ... </content-type> ... </content-types>
then Google News extension elements will be included in the generated sitemap document.
If you include a type="video"
attribute in a
content type's seo:enabled
element:
<content-types ... xmlns:seo="http://xmlns.escenic.com/2013/seo" ...> ... <content-type name="video"> ... <seo:enabled type="video" video-description="body"/> ... <field mime-type="application/xhtml+xml" type="basic" name="body"> <ui:label>Description</ui:label> </field> ... </content-type> ... </content-types>
then Google Video extension elements will be included in the
generated sitemap document. Note that in this case the element also has
a video-description
element that references one of
the content-item's field
elements. You should
reference the field that contains the best description of the video
content.
It is not possible to generate a sitemap that contains both Google News and Google video extension elements.
Include images in Google News/Video sitemaps
Both the Google News and Google Video extensions allow you to include information about images. The method is the same in both cases as shown in the following example:
<content-types ... xmlns:seo="http://xmlns.escenic.com/2013/seo" ...> ... <content-type name="news"> ... <seo:enabled type="news" image-relation-type="photos"/> ... <ref-relation-type-group name="photo-relation"/> </content-type> ... <content-type name="video"> ... <seo:enabled type="video" image-relation-type="photos"/> ... <ref-relation-type-group name="photo-relation"/> </content-type> ... <relation-type-group name="photo-relation"> <relation-type name="photos"> <ui:label>Photos</ui:label> </relation-type> </relation-type-group> ... <content-type name="photo"> ... <seo:image representation-field="alternates" representation="SmallSquare" /> ... <field name="alternates" type="basic" mime-type="application/json"> <representations xmlns="http://xmlns.escenic.com/2009/representations" type="image-versions"> ... <representation name="SmallSquare"> <output width="100" height="100"/> <crop/> <resize/> </representation> ... </representations> </field> ... </content-type> ... </content-types>
Both of the seo:enabled
elements in the above
example include an image-relation-type
element that
references a relation-type
element used for image
relations. When creating a Google News sitemap entry for a
news
content item, the plug-in will include image
data from the first relation it finds of the
referenced type (photos
, in this case). This means
that the generated sitemaps will only contain information about one
related image per content item.??
An image can have many different representations, so image content
types also need to include an seo:image
element that
specifies the representation to be used when including image data in
sitemap entries.