|
1 | 1 | .. _placeholder-variable-text:
|
2 | 2 |
|
3 |
| -=========================== |
4 |
| -Placeholder (Variable) Text |
5 |
| -=========================== |
| 3 | +============================ |
| 4 | +Placeholder or Variable Text |
| 5 | +============================ |
6 | 6 |
|
7 |
| -.. include:: /style-guide/includes/page-needs-update.rst |
| 7 | +.. default-domain:: mongodb |
8 | 8 |
|
9 |
| -Placeholder text (also referred to as variable text or replaceable |
10 |
| -text) stands for an object whose specific name is unknown to us. |
11 |
| -Placeholders are included when documenting syntax for how a command or |
12 |
| -path should be constructed. Users supply the relevant value for the |
13 |
| -placeholder when using the command or syntax. |
| 9 | +.. include:: /includes/styles/corrections.rst |
| 10 | + |
| 11 | +Use placeholder text for a value when you: |
| 12 | + |
| 13 | +- don't know its specific value |
| 14 | +- don't or shouldn't use an example value |
| 15 | + |
| 16 | +Use placeholders when demonstrating how a command or path should be |
| 17 | +constructed. Users supply the relevant value for the placeholder when |
| 18 | +using the command or syntax. When using placeholders, instruct users to |
| 19 | +replace the placeholders with the relevant values. |
| 20 | + |
| 21 | +Placeholder text can also referred to as *variable text* or |
| 22 | +*replaceable text*. |
14 | 23 |
|
15 | 24 | Placeholder text usually indicates the type of element that's being
|
16 | 25 | represented. For example, *directoryName* would likely indicate the
|
17 | 26 | name of a directory.
|
18 | 27 |
|
19 |
| -.. note:: |
20 | 28 |
|
21 |
| - Placeholder text is distinct from *environment variables*. |
22 |
| - Environment variables have established formats and names, such as |
23 |
| - ``$account``, and their values are set in the system by users and |
24 |
| - used consistently. By contrast, a placeholder is given a relevant |
25 |
| - value by the user at the time that the user runs the code or types |
26 |
| - the path. For information about formatting environment variables, |
27 |
| - see :ref:`text-formatting`. |
| 29 | +Placeholder Text Guidelines |
| 30 | +--------------------------- |
28 | 31 |
|
29 | 32 | When creating placeholder text, use the following guidelines.
|
30 | 33 |
|
31 | 34 | .. note::
|
32 | 35 |
|
33 |
| - For specific information about showing placeholders for account |
34 |
| - information such as account numbers, usernames, passwords, and API |
35 |
| - keys, see :ref:`cloud-account-info`. |
| 36 | + To learn about showing placeholders for API resources, see |
| 37 | + :ref:`cloud-account-info`. |
36 | 38 |
|
37 | 39 | .. list-table::
|
38 |
| - :widths: 50 50 |
| 40 | + :widths: 60 40 |
39 | 41 | :header-rows: 1
|
40 | 42 |
|
41 | 43 | * - Guidelines
|
42 | 44 |
|
43 | 45 | - Example
|
44 | 46 |
|
45 |
| - * - Within regular text, show placeholder text in italics. |
| 47 | + * - Within regular or inline text, show placeholder text in italics |
| 48 | + using the {+rst+} ``:samp::`` role and curly braces. Any text |
| 49 | + within curly braces inside the ``:samp:`` role renders in |
| 50 | + italics. |
46 | 51 |
|
47 |
| - Within code samples, use the RST ``:samp:`` directive, and |
48 |
| - enclose the placeholder text in curly braces. This formatting |
49 |
| - renders the placeholder in italics. |
| 52 | + - :samp:`mongod --port {portNumber} --dbpath {tempDatabasePath}` |
50 | 53 |
|
51 |
| - If you can't apply text formatting to the code, enclose |
| 54 | + * - Use the ``.. code-block:: <lexer>`` for multiline code examples. |
| 55 | + |
| 56 | + As you can't apply text formatting to the code, enclose |
52 | 57 | placeholders in punctuation that doesn't have any other special
|
53 |
| - use in the code. For example, use angle brackets or curly |
54 |
| - braces. Use a consistent convention throughout the documentation |
55 |
| - set. |
| 58 | + use in the code. Use a consistent convention throughout the documentation set per the programming language. |
| 59 | + |
| 60 | + - .. code-block:: rst |
| 61 | + :copyable: false |
| 62 | + |
| 63 | + .. code-block:: console |
| 64 | + |
| 65 | + mongod --port <portNumber> \ |
| 66 | + --dbpath <tempDatabasePath> \ |
| 67 | + --setParameter ttlMonitorEnabled=false |
56 | 68 |
|
57 |
| - - :samp:`nova boot {serverName} --image {image} --flavor {flavor} |
58 |
| - --nic net-id=net1_id` |
| 69 | + .. code-block:: console |
| 70 | + :copyable: false |
| 71 | + |
| 72 | + mongod --port <portNumber> \ |
| 73 | + --dbpath <tempDatabasePath> \ |
| 74 | + --setParameter ttlMonitorEnabled=false |
59 | 75 |
|
60 | 76 | * - Use lowercase letters except when showing a multiple-word
|
61 | 77 | placeholder.
|
62 | 78 |
|
63 |
| - To show a multiple-word placeholder, don't separate the words |
64 |
| - with spaces or symbols. To distinguish the words in the |
65 |
| - placeholder, capitalize the first letter of each word after the |
66 |
| - first word (called camelCase). Don't capitalize the first word. |
| 79 | + To show a multiple-word placeholder: |
| 80 | + |
| 81 | + - Don't separate the words with spaces or symbols |
| 82 | + - Capitalize the first letter of each word after the first word |
| 83 | + (called :wikipedia:`camelCase </Camel_case>`) |
| 84 | + - Never capitalize the first word |
67 | 85 |
|
68 | 86 | .. note::
|
69 |
| - Use lowercase and camelCase unless you have to follow the |
70 |
| - conventions of the programming language. For example, you |
71 |
| - might need to use underscores (account_ID) or all capitals |
72 |
| - (ACCOUNT_ID). |
| 87 | + Use lowercase and camelCase unless you need to follow the |
| 88 | + conventions of the programming language. |
| 89 | + |
| 90 | + - *password*, *eventTypeName*, *apiKey*, *hostId* |
| 91 | + |
| 92 | + * - Use one or more whole words to represent a placeholder. |
73 | 93 |
|
74 |
| - - *password* *serverName* *apiKey* *tenantId* |
| 94 | + - Don't sacrifice clarity for brevity. |
| 95 | + - Create descriptive and meaningful placeholders. |
75 | 96 |
|
76 |
| - * - In general, use one or more whole words to represent a |
77 |
| - placeholder. Don't sacrifice clarity for brevity. Create |
78 |
| - placeholders that are descriptive and meaningful. |
| 97 | + - *device*; not *dev* |
79 | 98 |
|
80 |
| - - *device* (instead of *dev*) |
| 99 | + *installationDirectory*; not *installDir* |
81 | 100 |
|
82 |
| - *installationDirectory* (instead of *installDir*) |
| 101 | + *mode*; not *########* (a series representing a number of |
| 102 | + digits) |
83 | 103 |
|
84 |
| - *mode* (instead of *########*) |
| 104 | +Placeholder Explanation Guidelines |
| 105 | +---------------------------------- |
85 | 106 |
|
86 |
| -When explaining a placeholder, use the following guidelines. |
| 107 | +When explaining a placeholder, use the following guidelines: |
87 | 108 |
|
88 | 109 | .. list-table::
|
89 | 110 | :widths: 40 60
|
90 | 111 | :header-rows: 1
|
91 | 112 |
|
92 |
| - * - Guidelines |
| 113 | + * - Guideline |
93 | 114 |
|
94 | 115 | - Example
|
95 | 116 |
|
96 |
| - * - Avoid stand-alone clauses that begin with *where*. Instead, use |
97 |
| - a sentence. |
98 |
| - |
99 |
| - - *Use:* |
100 |
| - |
101 |
| - **https://dfw.bigdata.api.MongoDBcloud.com/v1.0/yourAccountId/** |
102 |
| - |
103 |
| - *yourAccountId* is your actual account number, which is returned |
104 |
| - as part of the authentication service response. |
| 117 | + * - Use a sentence to describe the placeholder parameter. |
105 | 118 |
|
106 |
| - *Avoid:* |
| 119 | + - .. code-block:: console |
107 | 120 |
|
108 |
| - **https://dfw.bigdata.api.MongoDBcloud.com/v1.0/yourAccountId/** |
| 121 | + mongod --port <portNumber> \ |
| 122 | + --dbpath <tempDatabasePath> \ |
| 123 | + --setParameter ttlMonitorEnabled=false |
109 | 124 |
|
110 |
| - where *yourAccountId* is your actual account number, which is |
111 |
| - returned as part of the authentication service response. |
| 125 | + *port* is the unique number for the ``mongod`` service. The |
| 126 | + default value is ``27017``. |
112 | 127 |
|
113 |
| - * - If you need to explain two or more placeholders, use an |
114 |
| - unordered list. |
| 128 | + * - Use a table if you need to explain two or more placeholders. |
| 129 | + This table should provide the parameter, data type, necessity |
| 130 | + (*required*, *optional*, or *conditional*), and a description |
| 131 | + of that parameter. |
115 | 132 |
|
116 |
| - - From a supported web browser, type the following URL: |
| 133 | + - .. code-block:: console |
117 | 134 |
|
118 |
| - **http://hostName:portNumber/ed/index.html** |
| 135 | + mongod --port <portNumber> \ |
| 136 | + --dbpath <tempDatabasePath> \ |
| 137 | + --setParameter ttlMonitorEnabled=false |
119 | 138 |
|
120 |
| - The placeholders in the URL are defined as follows: |
| 139 | + .. list-table:: |
| 140 | + :widths: 15 10 10 65 |
| 141 | + :header-rows: 1 |
| 142 | + :stub-columns: 1 |
121 | 143 |
|
122 |
| - - *hostName* is the name of the host computer on which the |
123 |
| - application server is installed. |
| 144 | + * - Parameter |
| 145 | + - Type |
| 146 | + - Necessity |
| 147 | + - Description |
124 | 148 |
|
125 |
| - - *portNumber* is the port number assigned to the application |
126 |
| - server. The default is 8082. |
| 149 | + * - dbpath |
| 150 | + - string |
| 151 | + - Required |
| 152 | + - Root-relative file path for the temporary database. |
127 | 153 |
|
128 |
| - * - Show the placeholder in regular text with the same formatting |
129 |
| - that it's shown in the path or code. For example, if you can |
130 |
| - show it in italics, use italics when explaining it. If you |
131 |
| - first show the placeholder in a code block and need to enclose |
132 |
| - it in angle brackets, show it in angle brackets and monospace |
133 |
| - when explaining it. |
| 154 | + * - port |
| 155 | + - integer |
| 156 | + - Required |
| 157 | + - Unique number for this ``mongod`` service. The default |
| 158 | + value is ``27017``. |
134 | 159 |
|
135 |
| - - *Use:* |
| 160 | + * - setParameter |
| 161 | + - array |
| 162 | + - Required |
| 163 | + - List of key-value pairs that pass instructions to the |
| 164 | + ``mongod`` service. |
136 | 165 |
|
137 |
| - **https://dfw.bigdata.api.MongoDBcloud.com/v1.0/yourAccountId/** |
| 166 | + * - Avoid standalone clauses that begin with *where*. |
138 | 167 |
|
139 |
| - *yourAccountId* is your actual account number, which is returned |
140 |
| - as part of the authentication service response. |
| 168 | + - .. code-block:: console |
141 | 169 |
|
142 |
| - *Use:* |
| 170 | + mongod --port <portNumber> \ |
| 171 | + --dbpath <tempDatabasePath> \ |
| 172 | + --setParameter ttlMonitorEnabled=false |
143 | 173 |
|
144 |
| - Run the following command, replacing ``<dockerHostName>`` with |
145 |
| - the name of your Docker host: |
| 174 | + where *port* is the unique number for the ``mongod`` service. |
| 175 | + The default value is ``27017``. |
146 | 176 |
|
147 |
| - ``docker-machine env <dockerHostName> --shell cmd`` |
|
0 commit comments