Skip to content

Commit 0f38b37

Browse files
Anthony Sansoneatsansone
authored andcommitted
(DOCSP-11408) Update placeholder page
1 parent 0c7da0d commit 0f38b37

File tree

1 file changed

+113
-84
lines changed

1 file changed

+113
-84
lines changed

source/style-guide/style/placeholder-variable-text.txt

Lines changed: 113 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,147 +1,176 @@
11
.. _placeholder-variable-text:
22

3-
===========================
4-
Placeholder (Variable) Text
5-
===========================
3+
============================
4+
Placeholder or Variable Text
5+
============================
66

7-
.. include:: /style-guide/includes/page-needs-update.rst
7+
.. default-domain:: mongodb
88

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*.
1423

1524
Placeholder text usually indicates the type of element that's being
1625
represented. For example, *directoryName* would likely indicate the
1726
name of a directory.
1827

19-
.. note::
2028

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+
---------------------------
2831

2932
When creating placeholder text, use the following guidelines.
3033

3134
.. note::
3235

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`.
3638

3739
.. list-table::
38-
:widths: 50 50
40+
:widths: 60 40
3941
:header-rows: 1
4042

4143
* - Guidelines
4244

4345
- Example
4446

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.
4651

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}`
5053

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
5257
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
5668

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
5975

6076
* - Use lowercase letters except when showing a multiple-word
6177
placeholder.
6278

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
6785

6886
.. 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.
7393

74-
- *password* *serverName* *apiKey* *tenantId*
94+
- Don't sacrifice clarity for brevity.
95+
- Create descriptive and meaningful placeholders.
7596

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*
7998

80-
- *device* (instead of *dev*)
99+
*installationDirectory*; not *installDir*
81100

82-
*installationDirectory* (instead of *installDir*)
101+
*mode*; not *########* (a series representing a number of
102+
digits)
83103

84-
*mode* (instead of *########*)
104+
Placeholder Explanation Guidelines
105+
----------------------------------
85106

86-
When explaining a placeholder, use the following guidelines.
107+
When explaining a placeholder, use the following guidelines:
87108

88109
.. list-table::
89110
:widths: 40 60
90111
:header-rows: 1
91112

92-
* - Guidelines
113+
* - Guideline
93114

94115
- Example
95116

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.
105118

106-
*Avoid:*
119+
- .. code-block:: console
107120

108-
**https://dfw.bigdata.api.MongoDBcloud.com/v1.0/yourAccountId/**
121+
mongod --port <portNumber> \
122+
--dbpath <tempDatabasePath> \
123+
--setParameter ttlMonitorEnabled=false
109124

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``.
112127

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.
115132

116-
- From a supported web browser, type the following URL:
133+
- .. code-block:: console
117134

118-
**http://hostName:portNumber/ed/index.html**
135+
mongod --port <portNumber> \
136+
--dbpath <tempDatabasePath> \
137+
--setParameter ttlMonitorEnabled=false
119138

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
121143

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
124148

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.
127153

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``.
134159

135-
- *Use:*
160+
* - setParameter
161+
- array
162+
- Required
163+
- List of key-value pairs that pass instructions to the
164+
``mongod`` service.
136165

137-
**https://dfw.bigdata.api.MongoDBcloud.com/v1.0/yourAccountId/**
166+
* - Avoid standalone clauses that begin with *where*.
138167

139-
*yourAccountId* is your actual account number, which is returned
140-
as part of the authentication service response.
168+
- .. code-block:: console
141169

142-
*Use:*
170+
mongod --port <portNumber> \
171+
--dbpath <tempDatabasePath> \
172+
--setParameter ttlMonitorEnabled=false
143173

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``.
146176

147-
``docker-machine env <dockerHostName> --shell cmd``

0 commit comments

Comments
 (0)