|
17 | 17 | from botocore.model import StringShape |
18 | 18 | from botocore.utils import is_json_value_header |
19 | 19 |
|
20 | | -from awscli import SCALAR_TYPES |
| 20 | +from awscli import SCALAR_TYPES, __version__ as AWS_CLI_VERSION |
21 | 21 | from awscli.argprocess import ParamShorthandDocGen |
22 | 22 | from awscli.bcdoc.docevents import DOC_EVENTS |
23 | 23 | from awscli.topictags import TopicTagDB |
@@ -114,7 +114,9 @@ def doc_breadcrumbs(self, help_command, **kwargs): |
114 | 114 | full_cmd_list.append(cmd) |
115 | 115 | full_cmd_name = ' '.join(full_cmd_list) |
116 | 116 | doc.write(f':ref:`{cmd} <cli:{full_cmd_name}>`') |
117 | | - doc.write(' ]') |
| 117 | + doc.writeln(' ]') |
| 118 | + doc.writeln('') |
| 119 | + |
118 | 120 |
|
119 | 121 | def doc_title(self, help_command, **kwargs): |
120 | 122 | doc = help_command.doc |
@@ -223,6 +225,9 @@ def doc_relateditem(self, help_command, related_item, **kwargs): |
223 | 225 | ) |
224 | 226 | doc.write('\n') |
225 | 227 |
|
| 228 | + def doc_meta_description(self, help_command, **kwargs): |
| 229 | + pass |
| 230 | + |
226 | 231 | def _document_enums(self, model, doc): |
227 | 232 | """Documents top-level parameter enums""" |
228 | 233 | if isinstance(model, StringShape): |
@@ -402,6 +407,13 @@ def doc_subitem(self, command_name, help_command, **kwargs): |
402 | 407 | else: |
403 | 408 | doc.style.tocitem(command_name) |
404 | 409 |
|
| 410 | + def doc_meta_description(self, help_command, **kwargs): |
| 411 | + doc = help_command.doc |
| 412 | + reference = help_command.event_class.replace('.', ' ') |
| 413 | + doc.writeln("") |
| 414 | + doc.writeln(".. meta::") |
| 415 | + doc.writeln(f" :description: Learn about the AWS CLI {AWS_CLI_VERSION} {reference} commands.") |
| 416 | + |
405 | 417 |
|
406 | 418 | class OperationDocumentEventHandler(CLIDocumentEventHandler): |
407 | 419 | AWS_DOC_BASE = 'https://docs.aws.amazon.com/goto/WebAPI' |
@@ -618,6 +630,13 @@ def doc_output(self, help_command, event_name, **kwargs): |
618 | 630 | for member_name, member_shape in output_shape.members.items(): |
619 | 631 | self._doc_member(doc, member_name, member_shape, stack=[]) |
620 | 632 |
|
| 633 | + def doc_meta_description(self, help_command, **kwargs): |
| 634 | + doc = help_command.doc |
| 635 | + reference = help_command.event_class.replace('.', ' ') |
| 636 | + doc.writeln("") |
| 637 | + doc.writeln(".. meta::") |
| 638 | + doc.writeln(f" :description: Use the AWS CLI {AWS_CLI_VERSION} to run the {reference} command.") |
| 639 | + |
621 | 640 |
|
622 | 641 | class TopicListerDocumentEventHandler(CLIDocumentEventHandler): |
623 | 642 | DESCRIPTION = ( |
|
0 commit comments