Liferay Style Guide

Formatting

This article covers the formatting choices that apply to both product documentation and courses: text emphasis, code, lists, tables, headings, images, admonitions, file naming, front matter, and placeholders. For voice, phraseology, and organizing principles, see Core Style. For content-type-specific rules, see Documentation Style or Course Style.

Article Naming

Filenames are lowercase kebab-case and match the article’s H1 title. An article titled Using Message Boards has the filename using-message-boards.md. Never title an article Introduction to [Topic] (see also Core Style).

Front Matter

Sort front matter keys alphabetically, along with the values within taxonomy-category-names, but order toc by reading sequence rather than alphabetically. (The rendered page regroups and alphabetizes taxonomy categories on its own, so source order is purely for authoring consistency.)

A typical article’s front matter:

---
showChildrenCards: false
taxonomy-category-names:
  - Liferay PaaS
  - Liferay SaaS
  - Liferay Self-Hosted
toc:
  - ./getting-started.md
  - ./configuring-the-system.md
  - ./managing-users.md
uuid: 12345678-1234-1234-1234-123456789abc
---

Line Breaks

Paragraphs are on a single line; use dynamic word wrap and do not break at 80 columns. Separate paragraphs with two carriage returns.

Bold

Use bold sparingly. The reader’s eye is drawn to bold text, so too much of it dilutes the effect. All headings are bold by rendering, so avoid bolding body text gratuitously.

Use bold in these specific cases:

Field names in forms: Bold the field name followed by a colon when explaining a form.

Name: Enter the user’s name.

Address: Enter the user’s address.

Definition labels: Bold the term being defined (see Definitions).

Sub-section call-outs: When a body section contains multiple distinct labeled sub-items that do not warrant their own heading.

Never end a section with a list of form elements.

Label Casing

Capitalize the first word after the colon, including a sentence fragment, a list, or a single term. Liferay diverges from The Chicago Manual of Style here, which lowercases a fragment.

How the label itself is cased depends on what the label is:

  • A label that names something — a document part, a course artifact, a visual element, a term being defined — takes Title Case: Learning Objectives:, Knowledge Check:, Arrows:, Definition:.
  • A label that states a criterion or an instruction, which is the usual form inside a guidance list, stays sentence case: Lesson-based:, Concept-focused:, Direct and clear:, Align due dates:.

The distinction is what the label does, not where it sits: a name is a title, and a criterion is a phrase that would read oddly in title case.

Two labels sit outside both rules. A label reproducing a UI field label takes the product’s own casing, because the interface is the authority for what it calls things. A label quoting rule text keeps the quoted wording — the No “we,” no “let’s” label in Core Style is an example.

Italics

Concept Introductions

When introducing a concept for the first time, italicize the term. Do not italicize subsequent uses.

Liferay DXP is comprised of many OSGi modules. A module is a piece of functionality that can be a self-contained application or an extension to existing functionality.

UI Elements

UI element names — menus, pages, tabs, buttons, fields, and the like — are capitalized as they appear in the interface. Whether to also italicize depends on whether the reader acts on the element in that step.

When telling the reader to click something in the UI, italicize the element name:

Click Save to continue.

When referring to a UI element without a click directive, capitalize it but do not italicize:

After clicking the button, the Configuration page appears.

Combine the two rules to clarify which UI element receives the click:

On the Configuration page, click the Add button.

The element that receives direction is italicized; the surrounding context element is capitalized only.

To walk a reader through nested UI (a sequence of menu clicks or navigation steps), join the steps with a spaced right-arrow entity, →. Use the → entity only, not a literal Unicode arrow or an ASCII form like -->. Italicize each step the reader acts on, per UI Elements:

Go to Control Panel → Instance Settings → Sharing.

When a step in the path is an icon-only control, format that step with the Inline Icons convention:

Open the Global Menu (Global Menu) → Control Panel → System Settings.

Code

Offset blocks of code with three backticks and a language identifier:

```java
[Java code here]
```

Surround the following with single backticks so they appear inline as code:

  • File names
  • Classes
  • Database tables
  • Variables
  • Folders and directories
  • CLI commands and flags
  • Environment variable names
  • Configuration property keys and values
  • API endpoint paths
  • Port numbers in a technical context (8080)

Definitions

Definitions are paragraphs with the defined term in bold, followed by a colon. They are never bulleted:

Definition: A statement that describes the meaning of a term.

Term: An object, usually a noun, whose meaning must be defined.

A definition must never use the term it is defining.

Lists

Use numbered lists for sequential steps or when the order matters. Use bulleted lists for unordered items. Order bulleted-list items alphabetically when the order does not carry meaning.

When you state the count of items before listing them, use a numbered list:

There are three ways to create a site:

  1. Create a site.

  2. Create an organization and then a site for that organization.

  3. Create a new portal instance and then create a site within it.

When the count is not stated, a bulleted list is fine:

Clicking the button gives you these options:

  • View
  • Edit
  • Delete

Continuing-Sentence Lists

When the lead-in is not a complete sentence on its own and each list item completes it, omit the colon and let the items finish the sentence. This is the right choice when forcing the lead-in to be a complete clause would only add filler (“the following,” “these prerequisites”) to satisfy the colon rule.

Before configuring the ArgoCD domain, you must have

  • A deployed CNE environment
  • A registered domain (for example, argocd.mydomain.com)

Each item completes the lead-in (“you must have a deployed CNE environment”), so no colon and no filler word are needed.

Numbered List Style

Number every item with 1. (autonumbering). Single- or double-spaced is fine; use blank lines between items when each item contains multiple paragraphs or is more than one line:

1. This is a numbered list. When this paragraph ends, line up the second paragraph with the beginning of the first.

   This is the second paragraph in the first item.

1. This is the second item.

1. This is the third item.

Introducing Steps

Do not use a sentence fragment as a lead-in to steps. A fragment leaves a dangling construction that reads poorly. Either go straight to the first step, or use a brief, complete context sentence.

Bad (fragment lead-in):

## Editing Fields

To edit fields,

1. Step one

Good (steps directly):

## Editing Fields

1. Click the _Edit_ button.

1. Enter a name...

Also good (brief complete sentence before steps):

## Editing Fields

Fields can be edited at any time without affecting published content.

1. Click the _Edit_ button.

1. Enter a name...

Tables

| header 1 | header 2 | header 3 |
| :--- | :--- | :--- |
| cell 1 | cell 2 | cell 3 |
header 1header 2header 3
cell 1cell 2cell 3

Comparison Tables

When comparing features between items, such as Public and Private Pages, use a table with checkmarks:

| Behavior | Public Pages | Private Pages |
| --- | --- | --- |
| Visible to unauthenticated users | ✔ |  |
| Viewing requires Login and Site Membership |  | ✔ |
| Distinct URL pattern | ✔ | ✔ |

Table Descriptions

A description cell may be a noun phrase or a complete sentence, but a single table must not mix the two — consistency within the table matters more than which style you pick:

  • Noun-phrase descriptions take no terminal period (the same convention as list items).
  • Complete-sentence descriptions take a period.

If any cell needs a complete sentence — for example, a cell containing more than one sentence — write every cell in that column as a complete sentence.

Noun-phrase descriptions:

FieldDescription
NameObject name shown in the UI
ScopeAvailability of entries

Complete-sentence descriptions:

FieldDescription
NameThe object name appears in the UI.
ScopeEntries are available within this scope.

Headings

Use headings to create a logical hierarchy that helps readers scan and navigate the article.

  • H1: The article title. Exactly one per article. The first heading in the document. Must match the article’s title metadata.
  • H2: Major sections within an article. Most articles consist only of H2 sections.
  • H3: Subsections when a major section contains two or more distinct sub-topics that each warrant their own heading.
  • H4: