Update doclava template to include ReferenceObject meta data for devsite but only include the 'path' information for DAC docs because I'm not sure how other projects want to use that field https://developers.google.com/internal/publishing/reference/microdata/referenceobject bug: 62869488
am: 42466d0f94
Change-Id: I11d3d532bd8fc71e582d37ea0d553267abaf10e7
diff --git a/res/assets/templates-sdk/class.cs b/res/assets/templates-sdk/class.cs
index 66134f8..3891504 100644
--- a/res/assets/templates-sdk/class.cs
+++ b/res/assets/templates-sdk/class.cs
@@ -209,6 +209,14 @@
<html<?cs if:devsite ?> devsite<?cs /if ?>>
<?cs include:"head_tag.cs" ?>
<?cs include:"body_tag.cs" ?>
+<div itemscope itemtype="http://developers.google.com/ReferenceObject">
+<!-- This DIV closes at the end of the BODY -->
+ <meta itemprop="name" content="<?cs var:class.qualifiedType.label ?>" />
+ <?cs if:(dac&&class.artifact)
+ ?><meta itemprop="path" content="Support Library" /><?cs
+ elif:(dac&&class.since)
+ ?><meta itemprop="path" content="API level <?cs var:class.since ?>" /><?cs
+ /if ?>
<?cs include:"header.cs" ?>
<?cs # Includes api-info-block DIV at top of page. Standard Devsite uses right nav. ?>
<?cs if:dac ?><?cs include:"page_info.cs" ?><?cs /if ?>
@@ -671,5 +679,6 @@
<?cs include:"footer.cs" ?>
<?cs include:"trailer.cs" ?>
<?cs /if ?>
+</div><!-- end devsite ReferenceObject -->
</body>
</html>
diff --git a/res/assets/templates-sdk/head_tag.cs b/res/assets/templates-sdk/head_tag.cs
index 1f24860..bcc4fed 100644
--- a/res/assets/templates-sdk/head_tag.cs
+++ b/res/assets/templates-sdk/head_tag.cs
@@ -169,7 +169,8 @@
<meta name="hide_from_search_suggest" value="true" /><?cs
/if ?><?cs
if:reference ?>
- <meta name="body_class" value="api apilevel-<?cs var:class.since ?><?cs var:package.since ?>" /><?cs
+ <meta name="body_class" value="api apilevel-<?cs var:class.since ?><?cs var:package.since ?>" />
+ <meta name="page_type" value="reference" /><?cs
/if ?><?cs
if:!dac ?>
<meta name="hide_page_heading" value="true" /><?cs
diff --git a/res/assets/templates-sdk/package.cs b/res/assets/templates-sdk/package.cs
index 6a16bc0..2d9e628 100644
--- a/res/assets/templates-sdk/package.cs
+++ b/res/assets/templates-sdk/package.cs
@@ -6,6 +6,12 @@
<html<?cs if:devsite ?> devsite<?cs /if ?>>
<?cs include:"head_tag.cs" ?>
<?cs include:"body_tag.cs" ?>
+<div itemscope itemtype="http://developers.google.com/ReferenceObject">
+<!-- This DIV closes at the end of the BODY -->
+ <meta itemprop="name" content="<?cs var:page.title ?>" />
+ <?cs if:(dac&&package.since)
+ ?><meta itemprop="path" content="API level <?cs var:package.since ?>" /><?cs
+ /if ?>
<?cs include:"header.cs" ?>
<?cs # Includes api-info-block DIV at top of page. Standard Devsite uses right nav. ?>
<?cs if:dac ?><?cs include:"page_info.cs" ?><?cs /if ?>
@@ -61,5 +67,6 @@
<?cs include:"footer.cs" ?>
<?cs include:"trailer.cs" ?>
<?cs /if ?>
+</div><!-- end devsite ReferenceObject -->
</body>
</html>