Formatting reference
Applying formatting to certain elements in text aids readers in their understanding of that text. Using consistent text formatting also helps readers scan text for the information they're looking for. Use these formatting conventions when you write Splunk documentation.
Documentation elements
Review the following table for formatting guidance on documentation elements:
Element | Hard-coded format | Semantic tag | Examples | Comments |
---|---|---|---|---|
Error messages | Inline monospaced font or monospaced font block, depending on length | <systemoutput> |
"error":"HTTP 403 \"Forbidden\"" |
See Error and warning messages for more information. |
Keyboard shortcuts | No formatting | No semantic tag | Select Alt+N for Windows or *nix or Control+N for Mac. | Don't include spaces in the shortcut. See Keyboard shortcuts for more information. |
Manual names | Italics, headline-style capitalization | No semantic tag | See Managing connections in the Splunk Data Stream Processor in the Connect to Data Sources and Destinations with DSP manual. | See Manual names, topic titles, and section headings for more information. |
Topic titles and section headings | Sentence-style capitalization | No semantic tag | See Pass values to the class constructor in the Splunk Developer Portal. | See Manual names, topic titles, and section headings for more information. |
Words that are offset from the meaning of your sentence | Quotation marks | No semantic tag | Search for "Query tables" on the Microsoft website. | |
Words that you want to emphasize | No formatting | No semantic tag | Do not exceed your license limit. | Don't use bold, italics, or all capital letters to emphasize a word. |
Computer elements
Review the following table for formatting guidance on computer elements:
Element | Hard-coded format | Semantic tag | Examples | Comments |
---|---|---|---|---|
Directories, folders, repositories | No formatting | <filepath> |
|
Start partial directories with a forward slash ( / ) for *nix or a backslash ( \ ) for Windows. Enclose placeholder variables in angle brackets or use the <varname> element. |
Expressions | Inline monospaced font | <codeph> |
|
|
File extensions | No formatting | No semantic tag |
|
|
File names | No formatting | <filepath> | Navigate to the fields.conf file. | |
File paths | No formatting | <filepath> |
|
List both the *nix and Windows file paths, in that order. |
File types | All capital letters |
No semantic tag |
|
|
Hosts and ports | No formatting | No semantic tag |
|
Enclose placeholder variables in angle brackets or use the <varname> element. |
Menu paths | Bold type for menu names | <menucascade> |
|
When hard-coding the formatting, use the word "then" or equivalent text to separate the names of menus. |
Placeholder variables | Angle brackets | <varname> |
|
|
Tags (HTML, XML) | Inline monospaced font | <codeph> |
|
|
UI elements, including menu items, drop-down lists, buttons, text entry fields, panels, and dialog boxes | Bold type | <uicontrol> |
| |
URIs, URLs | See the Comments column | <url> |
|
Include http:// or https:// and www. Don't capitalize any letters in the link. Prevent fake links from rendering. |
User input in the UI | Bold type | <userinput> |
|
Splunk-specific elements
Review the following table for formatting guidance on Splunk-specific elements:
Element | Hard-coded format | Semantic tag | Examples | Comments |
---|---|---|---|---|
Index names | Bold type | <parmname> | Save the file in the main index. | |
Input names | Bold type | <parmname> | Select the myhost data input. | |
Knowledge objects such as fields, event types, lookups, tags, aliases, and data models | Inline monospaced font | <codeph> |
|
|
Searches | Search bar or monospaced font block | <codeblock> with outputclass attribute of "search"
|
See the following topics for search examples:
|
For guidance on line breaks in search tags, see Line breaks. |
Search results | Search table | <table> with outputclass attribute of "search"
|
For a search result example, see untable in the Splunk Enterprise Search Reference manual. | |
Source types | Inline monospaced font | <codeph> | This entry defines the access_combined source type.
|
|
SPL and SPL2 clauses | All capital letters | No semantic tag |
|
|
SPL and SPL2 commands, elements, functions, and macros | Inline monospaced font | <cmdname> |
|
|
Splexicon links | Bold type | Use geospatial lookups to return results that Splunk software can use to generate a choropleth map visualization. | For guidance on Splexicon links, see Formatting links in Splunk documentation. | |
Tenant names | Bold type | <parmname> |
|
|
Token names | Bold type | <parmname> | Update the access token. | |
User roles and capabilities | Bold type | <parmname> |
|
Configuration files
Review the following table for formatting guidance on configuration files:
Element | Hard-coded format | Semantic tag | Examples | Comments |
---|---|---|---|---|
Attributes or settings | Inline monospaced font | <codeph> |
|
|
Configuration files in text | Monospaced font block | <codeblock> | See the following topics for configuration file examples:
|
|
Configuration file names | No formatting | <filepath> | Navigate to the fields.conf file. | |
Configuration file parameters, arguments, and stanza names in text | Inline monospaced font | <codeph> |
|
Enclose stanza names in square brackets. |
Values | Inline monospaced font | <codeph> |
|
Command-line interface (CLI) elements
Review the following table for formatting guidance on CLI elements:
Element | Hard-coded format | Semantic tag | Examples | Comments |
---|---|---|---|---|
A complete command | Inline monospaced font | <codeph> | For a complete command example, see Manage secret storage using the Splunk REST API in the Splunk Developer Portal. | |
Command line arguments in a numbered list or longer than 1 line | Monospaced font block | <codeblock> | See the following topics for command line argument examples:
|
|
Command line arguments in a paragraph | Inline monospaced font | <codeph> | You can use the command line by entering ./splunk apply cluster-bundle in the CLI.
|
|
Command names | Inline monospaced font | <cmdname> | Run the btool command.
|
|
Command options or parameters | Inline monospaced font with italics | <option> | -u <username>
|
Enclose placeholder variables in angle brackets or use the <varname> element. |
REST API
Review the following table for formatting guidance on REST API elements:
Element | Hard-coded format | Semantic tag | Examples |
---|---|---|---|
API names | No formatting | No semantic tag |
|
Endpoint name | Bold type | <parmname> | Access the provisioner endpoint |
Endpoint path | No formatting | <filepath> | /system/provisioner/v1beta1/tenants |
HTTP or REST API method type | All capital letters | No semantic tag | Submit a GET request. |
HTTP or REST API methods in use | Monospaced font block | <codeblock> | GET /system/provisioner/v1beta1/tenants/ |
JSON bodies | Monospaced font block | <codeblock> | For a JSON body example, see REST Custom Function in the REST API Reference for Splunk SOAR (Cloud) manual. |
Object names | Bold type | <parmname> | the handle object |
REST API requests and responses | Monospaced font block | <codeblock> | For a REST API example, see Submit an app for inspection in the Splunk Developer Portal. |
REST response body | Monospaced font block | <codeblock> | For a REST response body example, see Submit an app for inspection in the Splunk Developer Portal. |
Request parameter | Inline monospaced font | <codeph> | "earliest_time": "-30m"
|
Returned REST response value | Inline monospaced font | <systemoutput> | IACQlgX2dSVNz7HVDRA9StAm0j
|
Code
Review the following table for formatting guidance on code:
Element | Hard-coded format | Semantic tag | Examples | Comments |
---|---|---|---|---|
Arguments | Inline monospaced font | <codeph> | Pass in arg1 as the argument for the param1 parameter and arg2 as the argument for the param2 parameter.
|
|
Classes | Inline monospaced font | <codeph> | The MyClass class
|
Capitalize class names with medial capitals. |
Code elements and usage | Inline monospaced font | <codeph> |
|
|
Code examples | Monospaced font block | <codeblock> | See the following topics for code examples:
|
|
Constants | All capital letters | No semantic tag | DEBUG_STREAMEVENTS | |
Function names | Bold type | <parmname> | Pass your arguments into the myFunction function. | |
Functions in use | Monospaced font block | <codeblock> | myFunction(arg1, arg2) |
|
Hexadecimal numbers | All capital letters for alphabetical characters | No semantic tag |
|
|
HTTP status codes | Inline monospaced font | <codeph> |
|
Use a lowercase "x" to represent a range. |
Methods | Inline monospaced font | <codeph> | The myMethod method
|
|
Parameter names | Bold type | <parmname> | This function accepts 2 parameters, param1 and param2. | |
Placeholder variables | Angle brackets | <varmame> | Open the /etc/apps/<your_app_name>/appserver/ folder. | |
Property names | Bold type | <parmname> | Add the stanza to your file using the setupview property. |
|
Properties in use | Monospaced font block | <codeblock> | For an example of a property in use, see Configure the Java agent for Splunk Observability Cloud in the Splunk Observability documentation. | |
Simple XML elements | Inline monospaced font | <codeph> | Find the <title>all</title> element.
|
|
Simple XML source code for dashboards | Monospaced font block | <codeblock> | For an example of Simple XML source code, see Simple XML Reference in the Splunk Enterprise Dashboards and Visualizations manual. | |
User-created values | Bold type | <userinput> | The value of the myStr parameter is hello. |
Capitalization | Line breaks |
This documentation applies to the following versions of Splunk® Style Guide: current
Feedback submitted, thanks!