From 31fce1489daf5a31461b0d41e3d4e200bb22f2d3 Mon Sep 17 00:00:00 2001 From: David Chen Date: Tue, 18 Aug 2015 08:39:51 +0000 Subject: Move presentation-specific logic from BE docgen into Velocity templates. Make documentation of predefined attributes consistent with new look and feel. -- MOS_MIGRATED_REVID=100905320 --- .../build/docgen/templates/build-encyclopedia.vm | 63 ++++++++++++++++++++-- 1 file changed, 58 insertions(+), 5 deletions(-) (limited to 'src/main/java/com/google/devtools/build/docgen/templates/build-encyclopedia.vm') diff --git a/src/main/java/com/google/devtools/build/docgen/templates/build-encyclopedia.vm b/src/main/java/com/google/devtools/build/docgen/templates/build-encyclopedia.vm index aa7f4fa82f..2fbc20db66 100644 --- a/src/main/java/com/google/devtools/build/docgen/templates/build-encyclopedia.vm +++ b/src/main/java/com/google/devtools/build/docgen/templates/build-encyclopedia.vm @@ -2,6 +2,60 @@ #parse("com/google/devtools/build/docgen/templates/be-header.vm") +#macro(ruledoc $ruleDocs) + #foreach ($rule in $ruleDocs) +

+ ${rule.ruleName} +

+ +
${rule.attributeSignature}
+ + $rule.htmlDocumentation + +

Arguments

+ + + + + + + + + + + + + + + + + #foreach ($attribute in $rule.attributes) + #if (!$attribute.isCommonType()) + + + + + #end + #end + +
AttributeDescription
name +

Name; required

+

A unique name for this rule.

+ ${rule.nameExtraHtmlDoc} +
+ ${attribute.attributeName} + + #if (!$attribute.synopsis.isEmpty()) +

${attribute.synopsis}

+ #end + $attribute.htmlDocumentation +
+ #if ($rule.isPublicByDefault()) + The default visibility is public: visibility = ["//visibility:public"]. + #end + #end +#end +

Other Stuff

-${SECTION_OTHER} +#ruledoc($otherDocs) #parse("com/google/devtools/build/docgen/templates/be-footer.vm") -- cgit v1.2.3