Configuration guides

Format service TOML and keep comments with the settings

·

Use the TOML Formatter to make configuration easier to review. The service example shows where spacing changes and which values to compare before replacing a file.

TOML Formatter

Compare the service sample at two indentation widths

Load the example, choose 2 spaces, and format it. Find the opening service note, title = "North gateway", and the ports array with 80 and 443 on separate indented lines.

Switch to 4 spaces and format again. The two existing array lines gain two spaces each. The inline health table still occupies one line with spaces around its assignments and after the comma.

TOML 1.1 key and value syntaxTOML 1.1 array syntax

Check order and exact source values before copying

Review the two service.route entries. The static entry comes first and assets comes second. Compare the grouped serial digits and the six fractional digits in release with the source.

Save formatted.toml after this comparison. For a multiline string, compare its literal text and line breaks as part of the review.

TOML 1.1 arrays of tablesTOML 1.1 string syntax

Use the version your TOML reader supports

The sample works under TOML 1.0 compatibility. If you paste maintenance = 07:30, that mode reports the missing seconds at the time value. Replace it with 07:30:00 if your reader requires TOML 1.0.

TOML 1.1 accepts shortened time values and relaxes inline table layout. Select that version when those forms are intended in the saved configuration.

TOML 1.0 specificationTOML 1.1 release changes

Common questions

Does changing indentation reflow arrays onto more lines?

The setting changes indentation for existing continuation lines. An inline array stays on one line.

Will a hash inside a value be treated as a comment?

A hash inside a quoted string is part of the string. Outside strings, a hash starts a comment through the end of the line.

Sources

Put it into practice.

Related guides