Skip to content

Commit 50f2094

Browse files
hamishwilleegithub-actions[bot]chrisdavidmills
authored
API property template - update for short title (mdn#40672)
* API property template - update for short title * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Chris Mills <chrisdavidmills@gmail.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
1 parent 42d358d commit 50f2094

File tree

1 file changed

+23
-7
lines changed
  • files/en-us/mdn/writing_guidelines/page_structures/page_types/api_property_subpage_template

1 file changed

+23
-7
lines changed

files/en-us/mdn/writing_guidelines/page_structures/page_types/api_property_subpage_template/index.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ sidebar: mdnsidebar
1818
> ```md
1919
> ---
2020
> title: "NameOfTheParentInterface: NameOfTheProperty property"
21+
> short-title: NameOfTheProperty
2122
> slug: Web/API/NameOfTheParentInterface/NameOfTheProperty
2223
> page-type: web-api-instance-property OR web-api-static-property
2324
> status:
@@ -32,6 +33,8 @@ sidebar: mdnsidebar
3233
> - : Title heading displayed at the top of the page.
3334
> Format as "NameOfTheParentInterface: NameOfTheProperty property".
3435
> For example, the [`capabilities`](/en-US/docs/Web/API/VRDisplay/capabilities) property of the [`VRDisplay`](/en-US/docs/Web/API/VRDisplay) interface has a `title` of `VRDisplay: capabilities property`.
36+
> - **short-title**
37+
> - : The name of the property (used in sidebar).
3538
> - **slug**
3639
> - : The end of the URL path after `https://developer.mozilla.org/en-US/docs/`.
3740
> This will be formatted like `Web/API/NameOfTheParentInterface/NameOfTheProperty`.
@@ -83,18 +86,31 @@ sidebar: mdnsidebar
8386
8487
{{SecureContext_Header}}{{AvailableInWorkers}}{{SeeCompatTable}}{{Deprecated_Header}}{{Non-standard_Header}}
8588
86-
Begin the content on the page with an introductory paragraph — start by naming the property, saying what interface it is part of, and saying what it does.
87-
This should ideally be one or two short sentences.
88-
You could copy most of this from the property's summary on the corresponding API reference page. Include whether it is read-only or not.
89+
The **`NameOfTheProperty`** [read-only] property of the \{{domxref("NameOfTheParentInterface")}} interface _\<provide concise summary of behavior\>_.
90+
91+
_Start by naming the property (indicating whether or not it is read-only) and the interface it is part of, and then say what it does._
92+
93+
_This should ideally be one or two short sentences._
94+
_If you need more than a couple of paragraphs, this should be added in a "Description" section placed before the "Examples" section._
8995
9096
## Value
9197
92-
Include a description of the property's value, including data type and what it represents. This should be in the form: "A [name of the property type] representing ...". For example:
98+
A \{{domxref("SomeDataType" }}.
99+
100+
_Normally just the data type, and allowed values for that data type if relevant._
101+
_If the property has different setter and getter behaviour, these should normally be covered in separate sentences._
102+
103+
_In some cases you may want to say more about what the data type represents._
104+
_This is acceptable, but should not duplicate information from the "Description" section (you should include information about what the value means there)._
105+
106+
_Note that some property pages are written in the form "Returns a [name of the property type] representing..." but this is not the recommended form.
107+
Also, some WebIDL extended attributes with specific meanings can be associated with the type. There are standard ways to document them; consult [Information contained in a WebIDL file](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file#type_of_the_property) for more information._
93108
94-
> A string representing...
109+
<!--
110+
## Description
95111
96-
Note that some property pages are written in the form "Returns a [name of the property type] representing..." but this is not the recommended form.
97-
Also, some WebIDL extended attributes with specific meanings can be associated with the type. There are standard ways to document them; consult [Information contained in a WebIDL file](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file#type_of_the_property) for more information.
112+
Additional description, if needed.
113+
-->
98114
99115
## Examples
100116

0 commit comments

Comments
 (0)