Adding a command
- Create a Markdown (.md) file in the appropriate collection:
./reference/_action-commands,./reference/_test-commands,./reference/_global-commands, or./reference/_special-commands.- If the command is a standard command, the filename should begin with the prefix
standard.. For examplestandard.print.md. - If the command is an element-specific command, the filename should begin with the element type. For example,
button.click.md. - If the command is a global command, do not include the
PennController.prefix. For example,AddHost.mdand notPennController.AddHost.md.
- If the command is a standard command, the filename should begin with the prefix
- Include the following front matter:
--- layout: command title: parent: grand_parent: syntax: blurb: extended_description: (optional) ---layout: The page layout; uselayout: command.title: The name of the command.parent: The navigational parent page.- If the command is an element command, use
parent: <ELEMENT_TYPE>. For example,parent: Audio element. - If the command is a global command, use
parent: Global commands. - If the command is a special command, use
parent: Special commands.
- If the command is an element command, use
grand_parent: The navigational grandparent page.- If the command is an element command, use
grand_parent: Elements. - If the command is a global or special command, use
grand_parent: Commands.
- If the command is an element command, use
syntax: The syntax for calling the command.blurb: One sentence description of the command.extended_description(optional) : An extended description of the command.- Printed in a column to the left of the element command TOC.
- Use
>-if the extended description has multiple lines.
Example:
--- layout: command title: clear parent: Special commands grand_parent: Commands syntax: clear() blurb: Removes from the screen any element that was previously added during the trial. --- - Add an example of the command:
## Example ```javascript // example ```- “Example” should be a heading level two.
- Add
javascriptto the opening code fence for syntax highlighting.