Publication configuration
The settings that change how the toolkit renders a specification, where each one is set, and who can change it.
1.Location of settings¶
The toolkit has no configuration file. It does not read a .oasis-publish.yml file in the TC's repository, and it does not read an oasis-publish: block in a specification's front matter. Earlier versions of this page described both. Neither was built, so a file or block written to that description has no effect.
Every setting is an environment variable on the workflow that runs the step. A TC editor does not set them. To change one for a publication, ask TC Administration when you request the publication, and say which specification it is for and why.
| Setting group | Read by | Typical reason to change it |
|---|---|---|
| Image embedding | Step 1.0, Markdown to HTML | One diagram is larger than the default limit, or embedding has to be turned off to investigate how an image renders |
| Fence rewriting | Step 1.0, Markdown to HTML | Investigating how a code block was rendered |
| PDF run limits | Step 2.0, HTML to PDF | A very large specification needs a longer deadline |
2.Front matter¶
The YAML front matter at the top of the Markdown source is metadata for pandoc. Pandoc reads it and leaves it out of the published document. Step 1.0 sets the HTML title from the first line of the source that begins #, and that value overrides a title: key in front matter.
---
title: "<Spec Title>"
---
# <Spec Title> Version 1.0
3.Image embedding¶
Step 1.0 copies each local image into the HTML as a data: URI, so the published HTML is one self-contained file. Remote images, such as the OASIS logo, stay as links.
| Variable | Default | Effect |
|---|---|---|
PUBLISHER_TOOLKIT_INLINE_IMAGES |
1 |
0 leaves every image as a link to its file |
PUBLISHER_TOOLKIT_INLINE_MAX_BYTES |
512000 (500 KB) |
Above this, an image is still embedded, with a warning in the log |
PUBLISHER_TOOLKIT_INLINE_HARD_LIMIT_BYTES |
2097152 (2 MB) |
Above this, one image stops the step |
PUBLISHER_TOOLKIT_INLINE_TOTAL_MAX_BYTES |
5242880 (5 MB) |
Above this, all embedded images together stop the step |
The check that runs before the PDF (defect class D7 on publication quality) applies the same 500 KB, 2 MB and 5 MB limits to image files the HTML links to, and does not read these variables. It skips an image that is already embedded as a data: URI. So if TC Administration raises a limit and step 1.0 embeds a larger image, step 2.0 lets it through. The acceptance checks at steps 5.0 and 6.0 then report any image file over 2 MB, and image files over 5 MB in total, as warnings, which do not stop go-live.
4.Fence rewriting¶
Pandoc does not accept text after the language name on a code fence, such as ```yaml <!-- json-path(...) -->, and renders the whole block as one line of inline code. Step 1.0 rewrites those fences into a form pandoc accepts before it runs pandoc. This rewrite does not change the source file. Step 1.0 does reformat the Markdown source with Prettier, and commits the formatted source back to the publication repository.
| Variable | Default | Effect |
|---|---|---|
PUBLISHER_TOOLKIT_PREPROCESS_FENCES |
1 |
0 passes fences to pandoc unchanged |
5.PDF run limits¶
Central step 2.0 prints the PDF with wkhtmltopdf. Headless Chrome is available to pinned consumers through templates/workflow_step_2_chrome.yml. Both run under the same limits, and each run ends with one status line: STEP2 SUCCESS, TIMEOUT, FAILED or INTERRUPTED.
| Variable | Default | Effect |
|---|---|---|
STEP2_TIMEOUT |
scaled to the input | A fixed deadline in seconds for one render |
STEP2_TIMEOUT_FLOOR |
60 |
The shortest scaled deadline, in seconds |
STEP2_TIMEOUT_PER_MB |
60 |
Seconds added for each MB of input HTML |
STEP2_TIMEOUT_CAP |
900 |
The longest scaled deadline, in seconds |
STEP2_STABLE_SECONDS |
5 |
How long the PDF must stop growing before it is checked and accepted |
STEP2_RETRIES |
1 |
Retries after a crash or a timeout that left no usable PDF |
STEP2_CHROME |
searched for | The Chrome binary to use |
The full list, including the grace period, poll interval and free-space minimum, is in the docstring of lib/robust_run.py.
6.Settings that cannot be changed¶
Some behaviour has no setting, because turning it off would publish a defect:
- the checks for defect classes D1 to D7 before the PDF, and A1 and A2 after it (publication quality);
- the page layout of the PDF: A4, the published OASIS footer, and a numbered table of contents;
- the acceptance checks that run before a publication goes live.
7.Questions and issues¶
Open a TCADMIN ticket at issues.oasis-open.org, or an issue on github.com/OASIS-Docs/publication-assurance for anything about the acceptance checks.
8.Related documentation¶
- Publication overview: what happens when a TC publishes a specification
- Getting started: onboarding a new TC for publication
- Publication quality: common publication issues and how the pipeline catches them
- TC Handbook: the process rules the publication mechanics serve
- Specification guidelines: the naming directives (v1.7 current) and naming guidelines that bind stage tokens, filenames, and URIs
- pub-check: the OASIS publication checks, which a TC can run in its own build before the vote. The set of checks grows;
--list-checksreports the current count
