@shoalrun/cli 0.1.0-alpha.19 → 0.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +15 -5
- package/agent-docs/.well-known/shoalrun/navigation/project-updates-50f26fe22670.txt +5 -3
- package/agent-docs/SNAPSHOT.json +5 -5
- package/agent-docs/about.md +3 -3
- package/agent-docs/author/agent-overview.md +2 -2
- package/agent-docs/author/components/code-blocks.md +46 -1
- package/agent-docs/author/frontmatter-reference.md +1 -0
- package/agent-docs/author/frontmatter-reference.sections/categorize-connect-and-present-the-page.md +1 -0
- package/agent-docs/author/workspace.md +2 -2
- package/agent-docs/author/writing-style.md +9 -3
- package/agent-docs/author/writing-style.sections/adapt-this-example.md +1 -1
- package/agent-docs/author/writing-style.sections/choose-components-by-reader-need.md +2 -2
- package/agent-docs/author/writing-style.sections/evidence-and-uncertainty.md +1 -1
- package/agent-docs/author/writing-style.sections/example-audience-and-scope.md +1 -1
- package/agent-docs/author/writing-style.sections/feature-availability.md +1 -1
- package/agent-docs/author/writing-style.sections/ingredients-recipes-and-cookbooks.md +1 -1
- package/agent-docs/author/writing-style.sections/page-purpose-and-structure.md +2 -2
- package/agent-docs/author/writing-style.sections/procedures-and-examples.md +1 -1
- package/agent-docs/author/writing-style.sections/related-reading.md +1 -1
- package/agent-docs/author/writing-style.sections/release-notes.md +30 -0
- package/agent-docs/author/writing-style.sections/review-a-draft.md +1 -1
- package/agent-docs/author/writing-style.sections/reviewed-writing-examples.md +1 -1
- package/agent-docs/author/writing-style.sections/voice-and-explanations.md +1 -1
- package/agent-docs/changelog/2026-10-16-navigation-layouts.md +1 -1
- package/agent-docs/changelog/pdf-custom-languages.md +48 -0
- package/agent-docs/changelog.md +9 -1
- package/agent-docs/config/examples.md +3 -3
- package/agent-docs/config/examples.sections/feature-showcase.md +3 -3
- package/agent-docs/config/examples.sections/minimal-site.md +2 -2
- package/agent-docs/config/examples.sections/multilingual-help-center.md +2 -2
- package/agent-docs/config/examples.sections/parcel-api-documentation.md +2 -2
- package/agent-docs/config/examples.sections/related-reading.md +2 -2
- package/agent-docs/config/examples.sections/shared-company-preset.md +2 -2
- package/agent-docs/config/outputs.md +33 -12
- package/agent-docs/config/outputs.sections/exports.md +3 -3
- package/agent-docs/config/outputs.sections/metadata.md +3 -3
- package/agent-docs/config/outputs.sections/pdf-output.md +51 -0
- package/agent-docs/config/outputs.sections/related-reading.md +3 -3
- package/agent-docs/configuration.md +2 -2
- package/agent-docs/configuration.sections/build-several-sites-from-shared-content.md +1 -1
- package/agent-docs/configuration.sections/change-inherited-lists-deliberately.md +1 -1
- package/agent-docs/configuration.sections/extract-a-section-with-include.md +1 -1
- package/agent-docs/configuration.sections/inspect-and-validate-changes.md +1 -1
- package/agent-docs/configuration.sections/related-reading.md +1 -1
- package/agent-docs/configuration.sections/separate-config-inheritance-from-page-metadata.md +1 -1
- package/agent-docs/configuration.sections/share-defaults-through-extends.md +1 -1
- package/agent-docs/configuration.sections/start-with-one-working-file.md +2 -2
- package/agent-docs/configuration.sections/understand-the-three-stages.md +1 -1
- package/agent-docs/configuration.sections/understand-where-paths-point.md +1 -1
- package/agent-docs/contribute/agent-skills.md +3 -1
- package/agent-docs/documents.json +510 -251
- package/agent-docs/features.md +4 -1
- package/agent-docs/index.md +2 -2
- package/agent-docs/provenance.json +6 -6
- package/agent-docs/publish/content-export.md +2 -0
- package/agent-docs/publish/content-export.sections/assets-downloads-and-notices.md +2 -0
- package/agent-docs/publish/content-export.sections/check-the-result.md +2 -0
- package/agent-docs/publish/content-export.sections/inspect-the-manifest.md +2 -0
- package/agent-docs/publish/content-export.sections/prerequisites.md +2 -0
- package/agent-docs/publish/content-export.sections/related-reading.md +2 -0
- package/agent-docs/publish/content-export.sections/review-exported-api-material.md +2 -0
- package/agent-docs/publish/content-export.sections/try-the-help-drawer-example.md +2 -0
- package/agent-docs/publish/content-export.sections/what-the-representations-retain.md +2 -0
- package/agent-docs/publish/pdf.md +184 -0
- package/agent-docs/publish/pdf.sections/apply-print-styling.md +65 -0
- package/agent-docs/publish/pdf.sections/check-the-result.md +33 -0
- package/agent-docs/publish/pdf.sections/export-a-page-or-publication.md +61 -0
- package/agent-docs/publish/pdf.sections/html-markdown-and-agents.md +31 -0
- package/agent-docs/publish/pdf.sections/offer-browser-page-printing.md +49 -0
- package/agent-docs/publish/pdf.sections/offer-direct-downloads-through-a-node-server.md +46 -0
- package/agent-docs/publish/pdf.sections/prerequisites.md +37 -0
- package/agent-docs/publish/pdf.sections/publish-an-optional-manual-download.md +39 -0
- package/agent-docs/publish.md +2 -0
- package/agent-docs/reference/agent-skills.md +7 -3
- package/agent-docs/search-index.json +1 -1
- package/agent-docs/start.md +4 -4
- package/agent-docs/start.sections/add-the-page-to-navigation.md +2 -2
- package/agent-docs/start.sections/build-and-check-both-outputs.md +2 -2
- package/agent-docs/start.sections/build-this-site.md +2 -2
- package/agent-docs/start.sections/check-writing-style.md +2 -2
- package/agent-docs/start.sections/create-a-page.md +2 -2
- package/agent-docs/start.sections/make-it-yours.md +2 -2
- package/agent-docs/start.sections/migrating-from-github-packages.md +2 -2
- package/agent-docs/start.sections/prerequisites.md +2 -2
- package/agent-docs/start.sections/related-reading.md +2 -2
- package/agent-docs/start.sections/start-your-own-project.md +4 -4
- package/agent-docs/status.md +7 -5
- package/agent-docs/what-is-shoalrun.md +2 -2
- package/assets/copy-markdown.js +1 -1
- package/assets/print-view.js +165 -0
- package/assets/print.js +63 -0
- package/dist/artifact-bundle.d.ts +1 -0
- package/dist/artifact-bundle.js +2 -0
- package/dist/authoring-snapshot.js +1 -1
- package/dist/browser-print-assets.d.ts +9 -0
- package/dist/browser-print-assets.js +45 -0
- package/dist/compiler.d.ts +4 -2
- package/dist/compiler.js +29 -4
- package/dist/content-export-command.d.ts +77 -1
- package/dist/content-export-command.js +5 -2
- package/dist/content-export-config.d.ts +4 -1
- package/dist/content-export-config.js +10 -5
- package/dist/content-export-render.d.ts +9 -3
- package/dist/content-export-render.js +11 -7
- package/dist/content-export.d.ts +126 -0
- package/dist/content-export.js +267 -124
- package/dist/content-source.d.ts +1 -0
- package/dist/frontmatter.js +5 -2
- package/dist/highlight-languages.d.ts +9 -0
- package/dist/highlight-languages.js +52 -0
- package/dist/highlight.d.ts +4 -1
- package/dist/highlight.js +20 -5
- package/dist/output-commit.d.ts +1 -1
- package/dist/output-commit.js +4 -2
- package/dist/page-renderer.js +6 -1
- package/dist/pdf-button.d.ts +22 -0
- package/dist/pdf-button.js +55 -0
- package/dist/pdf-config.d.ts +28 -0
- package/dist/pdf-config.js +43 -0
- package/dist/pdf-http.d.ts +36 -0
- package/dist/pdf-http.js +132 -0
- package/dist/pdf-project.d.ts +6 -0
- package/dist/pdf-project.js +31 -0
- package/dist/pdf-renderer.d.ts +45 -0
- package/dist/pdf-renderer.js +208 -0
- package/dist/pdf-site.d.ts +37 -0
- package/dist/pdf-site.js +65 -0
- package/dist/pdf-stylesheet.d.ts +1 -0
- package/dist/pdf-stylesheet.js +57 -0
- package/dist/representation-tree.js +1 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.js +35 -8
- package/dist/vercel.js +6 -0
- package/examples/custom-language/README.md +32 -0
- package/examples/custom-language/content/start.mdx +28 -0
- package/examples/custom-language/docs.config.yaml +18 -0
- package/examples/custom-language/grammars/custompy.tmLanguage.json +7 -0
- package/examples/pdf/README.md +27 -0
- package/examples/pdf/content/operations.mdx +26 -0
- package/examples/pdf/content/start.mdx +28 -0
- package/examples/pdf/docs.config.yaml +29 -0
- package/examples/pdf/print.css +9 -0
- package/package.json +4 -2
- package/skills/shoalrun-author/SKILL.md +2 -0
- package/skills/shoalrun-author/references/pdf-export.md +15 -0
- package/skills/shoalrun-brand/SKILL.md +2 -0
- package/skills/shoalrun-pdf/SKILL.md +49 -0
- package/skills/shoalrun-pdf/assets/print.css +49 -0
- package/skills/shoalrun-pdf/references/print-design.md +75 -0
- package/styles/site.css +3 -1
package/agent-docs/features.md
CHANGED
|
@@ -16,7 +16,7 @@ Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigat
|
|
|
16
16
|
|
|
17
17
|
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Get started > Shoalrun features
|
|
18
18
|
|
|
19
|
-
**Updated: 2026-11-
|
|
19
|
+
**Updated: 2026-11-06.**
|
|
20
20
|
|
|
21
21
|
Shoalrun compiles product and API documentation into a website and agent-readable content from the same source. You own the source files, build output, and deployment. The normal compiler build makes no model calls or network requests.
|
|
22
22
|
|
|
@@ -29,12 +29,15 @@ Follow a topic link for configuration, examples, and limits.
|
|
|
29
29
|
| [One source, multiple outputs](https://www.shoalrun.com/publish/agent-friendliness.md) | Write Markdown and supported MDX; publish HTML, Markdown copies, discovery indexes, manifests, and readable sections. |
|
|
30
30
|
| [Structured authoring](https://www.shoalrun.com/author/content.md) | Give documents stable IDs; reuse templates, snippets, variables, metadata, and configuration. Connect navigation and related reading by ID. |
|
|
31
31
|
| [Documentation components](https://www.shoalrun.com/author/components.md) | Use tabs, callouts, tables, steps, walkthroughs, diagrams, and trusted custom components with defined Markdown representations. |
|
|
32
|
+
| [Code highlighting](https://www.shoalrun.com/author/components/code-blocks.md) | Highlight built-in languages or register a custom language with a local TextMate JSON grammar and aliases. Preserve the original code in Markdown. |
|
|
32
33
|
| [OpenAPI documentation](https://www.shoalrun.com/publish/api-references.md) | Generate reference pages, embed API examples and schemas, show request samples, and publish focused operation contracts. Review source changes before publishing. |
|
|
33
34
|
| [Customer editions](https://www.shoalrun.com/publish/deployment-profiles.md) | Select exact product releases, SKU revisions, and feature grants. Remove excluded pages and sections during compilation. |
|
|
34
35
|
| [Independent products and versions](https://www.shoalrun.com/publish/publications.md) | Give each product its own documentation versions and defaults, with explicit languages and routes. |
|
|
35
36
|
| [Search and agent tools](https://www.shoalrun.com/search-and-chat.md) | Search the selected publication by keyword or optional semantic retrieval. Read-only Model Context Protocol (MCP) tools discover publications and read pages within token budgets. Optional cited answers use your providers. |
|
|
36
37
|
| [Content delivery](https://www.shoalrun.com/content-delivery.md) | Export selected pages, approved sections, and snippets for an application. Clients and REST retain exact product scope; productless version 1 contracts remain supported. |
|
|
38
|
+
| [Printing and styled PDFs](https://www.shoalrun.com/publish/pdf.md) | Offer branded Print PDF buttons, export styled pages or full manuals with the CLI, and serve optional page PDF downloads through a Node host. |
|
|
37
39
|
| [Workflows and validation](https://www.shoalrun.com/author/agent-overview.md) | Use your coding agent with project discovery, isolated validation, and matching previews. Watch a customer edition with `dev --profile`. Compose recipes and cookbooks. |
|
|
40
|
+
| [Agent skills](https://www.shoalrun.com/reference/agent-skills.md) | Use packaged workflows for setup, authoring, components, recipes, walkthroughs, branding, and PDF design with `shoalrun-pdf`. |
|
|
38
41
|
| [Presentation and navigation](https://www.shoalrun.com/styling/themes.md) | Configure themes, layouts, branding, and navigation. Switch publications through a grouped dropdown, with language labels hidden automatically for single-language editions. |
|
|
39
42
|
| [Publishing and measurement](https://www.shoalrun.com/publish.md) | Publish static output or use Node and Vercel serving options. Add analytics through optional adapters. |
|
|
40
43
|
|
package/agent-docs/index.md
CHANGED
|
@@ -12,7 +12,7 @@ canonical: /
|
|
|
12
12
|
|
|
13
13
|
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
14
14
|
|
|
15
|
-
**Updated: 2026-11-
|
|
15
|
+
**Updated: 2026-11-06.**
|
|
16
16
|
|
|
17
17
|
**Docs for people. Context for agents.**
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ One source, two audiences. Build interactive docs for people and readable conten
|
|
|
22
22
|
- [See what an agent gets](https://www.shoalrun.com/publish/agent-friendliness.md)
|
|
23
23
|
- [See what works today](https://www.shoalrun.com/status.md)
|
|
24
24
|
|
|
25
|
-
> **Try the
|
|
25
|
+
> **Try the beta:** Install `@shoalrun/cli` from npm. No account or token is needed, and the normal build makes no model calls or network requests. Pin an exact version during the beta.
|
|
26
26
|
>
|
|
27
27
|
> [Install Shoalrun →](https://www.shoalrun.com/start.md)
|
|
28
28
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"siteBuild": {
|
|
4
4
|
"schemaVersion": 1,
|
|
5
|
-
"configDigest": "
|
|
6
|
-
"buildId": "
|
|
5
|
+
"configDigest": "e3d0124ef8866a0cd2080cd8b3822909d5b4e288ef0c642b1ebcaebe2591c305",
|
|
6
|
+
"buildId": "30b28d69af454479a90a00f3b015448f97af9be0c46d153441408b899ccaf08f"
|
|
7
7
|
},
|
|
8
|
-
"packageIntegrity": "sha512-
|
|
8
|
+
"packageIntegrity": "sha512-uigk3DRE8FClwgyo5kGeyPtB7CXkpLVEAQGhHxMd0exbFThqvvMxPGGVL7rohJdw+o0xSmFNK0U7/TvwLatyZw==",
|
|
9
9
|
"compilerPackage": {
|
|
10
10
|
"kind": "reviewed-local-artifact",
|
|
11
11
|
"name": "@shoalrun/cli",
|
|
12
|
-
"version": "0.1.0-
|
|
13
|
-
"integrity": "sha512-
|
|
12
|
+
"version": "0.1.0-beta.1",
|
|
13
|
+
"integrity": "sha512-uigk3DRE8FClwgyo5kGeyPtB7CXkpLVEAQGhHxMd0exbFThqvvMxPGGVL7rohJdw+o0xSmFNK0U7/TvwLatyZw=="
|
|
14
14
|
},
|
|
15
|
-
"manifestDigest": "
|
|
15
|
+
"manifestDigest": "7337bcec6d88bb4934afff2eb68562244f9391af3d651ead5111fa2bf794c132"
|
|
16
16
|
}
|
|
@@ -20,6 +20,8 @@ Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Publish and
|
|
|
20
20
|
|
|
21
21
|
Keep application help and your documentation website in one content source. `shoalrun export` produces a directory of resolved Markdown, passive HTML fragments, referenced assets, and a manifest. Your application owns the help drawer, onboarding screen, or other interface that displays the content. It doesn't need a Shoalrun browser runtime.
|
|
22
22
|
|
|
23
|
+
For printable pages and manuals, use [styled PDF export](https://www.shoalrun.com/publish/pdf.md). PDF exports use the site's selection by default and have their own artifact manifest. The HTML and Markdown bundles described here keep their independent selection contract.
|
|
24
|
+
|
|
23
25
|
## Prerequisites
|
|
24
26
|
|
|
25
27
|
Install Shoalrun `0.1.0-alpha.13` or newer in the documentation project. This guide uses the resource-based export manifest described in the [manifest reference](https://www.shoalrun.com/content-delivery/manifest.md).
|
|
@@ -22,6 +22,8 @@ Parent page: [Full Markdown page](/publish/content-export.md)
|
|
|
22
22
|
|
|
23
23
|
Keep application help and your documentation website in one content source. `shoalrun export` produces a directory of resolved Markdown, passive HTML fragments, referenced assets, and a manifest. Your application owns the help drawer, onboarding screen, or other interface that displays the content. It doesn't need a Shoalrun browser runtime.
|
|
24
24
|
|
|
25
|
+
For printable pages and manuals, use [styled PDF export](https://www.shoalrun.com/publish/pdf.md). PDF exports use the site's selection by default and have their own artifact manifest. The HTML and Markdown bundles described here keep their independent selection contract.
|
|
26
|
+
|
|
25
27
|
## Assets, downloads, and notices
|
|
26
28
|
|
|
27
29
|
Local assets must be inside the content directory or an explicitly configured `assetRoots` directory. Roots and notice paths resolve relative to the config file that declares them:
|
|
@@ -22,6 +22,8 @@ Parent page: [Full Markdown page](/publish/content-export.md)
|
|
|
22
22
|
|
|
23
23
|
Keep application help and your documentation website in one content source. `shoalrun export` produces a directory of resolved Markdown, passive HTML fragments, referenced assets, and a manifest. Your application owns the help drawer, onboarding screen, or other interface that displays the content. It doesn't need a Shoalrun browser runtime.
|
|
24
24
|
|
|
25
|
+
For printable pages and manuals, use [styled PDF export](https://www.shoalrun.com/publish/pdf.md). PDF exports use the site's selection by default and have their own artifact manifest. The HTML and Markdown bundles described here keep their independent selection contract.
|
|
26
|
+
|
|
25
27
|
## Check the result
|
|
26
28
|
|
|
27
29
|
Check the app from a route unrelated to the export mount. Confirm that images load, document links stay in the drawer when intercepted, canonical links open the website, and all expected content is visible. Re-export after changing source content, and distribute the updated bundle with the application.
|
|
@@ -22,6 +22,8 @@ Parent page: [Full Markdown page](/publish/content-export.md)
|
|
|
22
22
|
|
|
23
23
|
Keep application help and your documentation website in one content source. `shoalrun export` produces a directory of resolved Markdown, passive HTML fragments, referenced assets, and a manifest. Your application owns the help drawer, onboarding screen, or other interface that displays the content. It doesn't need a Shoalrun browser runtime.
|
|
24
24
|
|
|
25
|
+
For printable pages and manuals, use [styled PDF export](https://www.shoalrun.com/publish/pdf.md). PDF exports use the site's selection by default and have their own artifact manifest. The HTML and Markdown bundles described here keep their independent selection contract.
|
|
26
|
+
|
|
25
27
|
## Inspect the manifest
|
|
26
28
|
|
|
27
29
|
The manifest uses typed `resources` for pages, sections, and snippet instances. See the [manifest contract](https://www.shoalrun.com/content-delivery/manifest.md) and [content client](https://www.shoalrun.com/content-delivery/client.md) for resource lookup and retrieval.
|
|
@@ -22,6 +22,8 @@ Parent page: [Full Markdown page](/publish/content-export.md)
|
|
|
22
22
|
|
|
23
23
|
Keep application help and your documentation website in one content source. `shoalrun export` produces a directory of resolved Markdown, passive HTML fragments, referenced assets, and a manifest. Your application owns the help drawer, onboarding screen, or other interface that displays the content. It doesn't need a Shoalrun browser runtime.
|
|
24
24
|
|
|
25
|
+
For printable pages and manuals, use [styled PDF export](https://www.shoalrun.com/publish/pdf.md). PDF exports use the site's selection by default and have their own artifact manifest. The HTML and Markdown bundles described here keep their independent selection contract.
|
|
26
|
+
|
|
25
27
|
## Prerequisites
|
|
26
28
|
|
|
27
29
|
Install Shoalrun `0.1.0-alpha.13` or newer in the documentation project. This guide uses the resource-based export manifest described in the [manifest reference](https://www.shoalrun.com/content-delivery/manifest.md).
|
|
@@ -22,6 +22,8 @@ Parent page: [Full Markdown page](/publish/content-export.md)
|
|
|
22
22
|
|
|
23
23
|
Keep application help and your documentation website in one content source. `shoalrun export` produces a directory of resolved Markdown, passive HTML fragments, referenced assets, and a manifest. Your application owns the help drawer, onboarding screen, or other interface that displays the content. It doesn't need a Shoalrun browser runtime.
|
|
24
24
|
|
|
25
|
+
For printable pages and manuals, use [styled PDF export](https://www.shoalrun.com/publish/pdf.md). PDF exports use the site's selection by default and have their own artifact manifest. The HTML and Markdown bundles described here keep their independent selection contract.
|
|
26
|
+
|
|
25
27
|
## Related reading
|
|
26
28
|
|
|
27
29
|
### Reference while working
|
|
@@ -22,6 +22,8 @@ Parent page: [Full Markdown page](/publish/content-export.md)
|
|
|
22
22
|
|
|
23
23
|
Keep application help and your documentation website in one content source. `shoalrun export` produces a directory of resolved Markdown, passive HTML fragments, referenced assets, and a manifest. Your application owns the help drawer, onboarding screen, or other interface that displays the content. It doesn't need a Shoalrun browser runtime.
|
|
24
24
|
|
|
25
|
+
For printable pages and manuals, use [styled PDF export](https://www.shoalrun.com/publish/pdf.md). PDF exports use the site's selection by default and have their own artifact manifest. The HTML and Markdown bundles described here keep their independent selection contract.
|
|
26
|
+
|
|
25
27
|
## Review exported API material
|
|
26
28
|
|
|
27
29
|
The export preserves the API source-review gate. If its selected API material has no matching review digest, the normal command fails before replacing the previous bundle. Produce a candidate for inspection with:
|
|
@@ -22,6 +22,8 @@ Parent page: [Full Markdown page](/publish/content-export.md)
|
|
|
22
22
|
|
|
23
23
|
Keep application help and your documentation website in one content source. `shoalrun export` produces a directory of resolved Markdown, passive HTML fragments, referenced assets, and a manifest. Your application owns the help drawer, onboarding screen, or other interface that displays the content. It doesn't need a Shoalrun browser runtime.
|
|
24
24
|
|
|
25
|
+
For printable pages and manuals, use [styled PDF export](https://www.shoalrun.com/publish/pdf.md). PDF exports use the site's selection by default and have their own artifact manifest. The HTML and Markdown bundles described here keep their independent selection contract.
|
|
26
|
+
|
|
25
27
|
## Try the help-drawer example
|
|
26
28
|
|
|
27
29
|
The package's `examples/help-drawer` directory contains a small application with two help documents, an image, a diagram, reader sections, tabs, a walkthrough, and a custom component. Copy it into a project with Shoalrun installed, then run from that example directory:
|
|
@@ -22,6 +22,8 @@ Parent page: [Full Markdown page](/publish/content-export.md)
|
|
|
22
22
|
|
|
23
23
|
Keep application help and your documentation website in one content source. `shoalrun export` produces a directory of resolved Markdown, passive HTML fragments, referenced assets, and a manifest. Your application owns the help drawer, onboarding screen, or other interface that displays the content. It doesn't need a Shoalrun browser runtime.
|
|
24
24
|
|
|
25
|
+
For printable pages and manuals, use [styled PDF export](https://www.shoalrun.com/publish/pdf.md). PDF exports use the site's selection by default and have their own artifact manifest. The HTML and Markdown bundles described here keep their independent selection contract.
|
|
26
|
+
|
|
25
27
|
## What the representations retain
|
|
26
28
|
|
|
27
29
|
Exports resolve snippets, supported components, and API material before rendering. Static output keeps the substantive content of interactive components:
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: guide.pdf-export
|
|
3
|
+
title: Export styled PDFs
|
|
4
|
+
summary: Export a page or publication as a PDF and offer an optional page download.
|
|
5
|
+
type: how-to
|
|
6
|
+
area: publishing
|
|
7
|
+
subarea: publishing-builds
|
|
8
|
+
canonical: /publish/pdf
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Export styled PDFs
|
|
12
|
+
|
|
13
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
14
|
+
|
|
15
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
16
|
+
|
|
17
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Publish and maintain > Export styled PDFs
|
|
18
|
+
|
|
19
|
+
**Updated: 2026-11-06.**
|
|
20
|
+
|
|
21
|
+
**Available since: 0.1.0-beta.1.**
|
|
22
|
+
|
|
23
|
+
Offer **Print PDF** on a static site using the visitor's browser. Site builds generate no page PDFs or extra print documents. When you want a downloadable full manual, export it explicitly through the CLI with your own fonts, colors, paper size, and print layout. A Node host can also offer direct page PDF downloads on request.
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
Start with a Shoalrun project and an enabled publication. Browser page printing needs no build-time browser or PDF service. For CLI PDF export, install Chrome or Chromium on the machine that generates the file. Shoalrun doesn't download a browser during installation. Set `SHOALRUN_PDF_BROWSER` to the browser executable, or configure `outputs.pdf.executablePath`.
|
|
28
|
+
|
|
29
|
+
For example, on macOS with Chrome installed in Applications:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
export SHOALRUN_PDF_BROWSER="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
CLI exports need the configured browser. Endpoint generation needs it on the Node server. The Vercel build adapter supports browser page printing and rejects endpoint mode before building.
|
|
36
|
+
|
|
37
|
+
## Export a page or publication
|
|
38
|
+
|
|
39
|
+
Run the page command with the page's stable document ID:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
npx --no-install shoalrun export docs.config.yaml --format pdf --document guide.start --out pdf/page
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Omit `--document` to export a complete publication:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
npx --no-install shoalrun export docs.config.yaml --format pdf --out pdf/manual
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
If several publications are enabled, select one explicitly. These product and version values are examples:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
npx --no-install shoalrun export docs.config.yaml --format pdf --product core --channel production --version v2 --language en --out pdf/core-v2
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Pass `--profile customer.yaml` when exporting a [customer edition](https://www.shoalrun.com/publish/deployment-profiles.md). PDF selection uses the target's `contentFilter`, or the site's `site.contentFilter` when the target doesn't specify one. Product, version, language, page access policy, and feature requirements apply before rendering. A missing or excluded explicitly requested page fails.
|
|
58
|
+
|
|
59
|
+
Publication chapters follow navigation order. Eligible pages outside navigation are appended in stable document-ID order and reported in diagnostics. A named export target can supply an explicit document order:
|
|
60
|
+
|
|
61
|
+
```yaml
|
|
62
|
+
exports:
|
|
63
|
+
manual:
|
|
64
|
+
formats: [pdf]
|
|
65
|
+
documents: [guide.start, guide.configure]
|
|
66
|
+
pdf:
|
|
67
|
+
cover: true
|
|
68
|
+
toc: true
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Run that target with `--target manual`. PDF targets contain whole pages and use a separate PDF manifest. Export HTML and Markdown in another invocation when your application needs those representations too.
|
|
72
|
+
|
|
73
|
+
## Apply print styling
|
|
74
|
+
|
|
75
|
+
Set defaults under `outputs.pdf`; a target's `pdf` settings override them. Paths resolve from the configuration file that declares them.
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
outputs:
|
|
79
|
+
pdf:
|
|
80
|
+
stylesheet: ./styles/print.css
|
|
81
|
+
size: Letter
|
|
82
|
+
margins: { top: 20mm, right: 18mm, bottom: 20mm, left: 18mm }
|
|
83
|
+
footer: "{title} | {page} / {pages}"
|
|
84
|
+
logo: ./assets/logo.svg
|
|
85
|
+
subtitle: Operations manual
|
|
86
|
+
fonts:
|
|
87
|
+
- family: Documentation
|
|
88
|
+
source: ./assets/documentation.woff2
|
|
89
|
+
weight: "400"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Use a local font that you're allowed to embed. Reference the registered family in your stylesheet:
|
|
93
|
+
|
|
94
|
+
```css title="styles/print.css"
|
|
95
|
+
:root {
|
|
96
|
+
--pdf-accent: #245849;
|
|
97
|
+
--pdf-text: #172722;
|
|
98
|
+
--pdf-muted: #53665e;
|
|
99
|
+
--pdf-font: Documentation, Arial, sans-serif;
|
|
100
|
+
--pdf-code-font: monospace;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
h2 { break-after: avoid; }
|
|
104
|
+
.pdf-chapter + .pdf-chapter { break-before: page; }
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The stylesheet can customize the cover, contents, chapters, tables, code, and page breaks. It can't load URLs or import other stylesheets; register fonts explicitly. CLI exports require staged local images; remote images fail instead of being fetched. Browser print views load the images referenced by the current page.
|
|
108
|
+
|
|
109
|
+
Paper sizes are `A4`, `Letter`, `Legal`, `A3`, and `A5`. Margins accept `mm`, `cm`, `in`, or `px`. Header and footer fields accept escaped text with `{title}`, `{page}`, and `{pages}` placeholders; they use a separate small-text layout and don't inherit body CSS. `timeout` bounds rendering to 1,000–120,000 milliseconds; its default is 30,000.
|
|
110
|
+
|
|
111
|
+
Publication exports enable the cover and linked table of contents by default; a single explicitly requested page omits them. Override `cover` and `toc` when needed. The contents links don't show printed page numbers. `bookmarks` defaults to true, using Chromium's experimental PDF outline support. Verify bookmarks in your browser's output; tagging doesn't establish PDF/UA compliance.
|
|
112
|
+
|
|
113
|
+
## Offer browser page printing
|
|
114
|
+
|
|
115
|
+
The action is off by default. For a static host, enable browser printing:
|
|
116
|
+
|
|
117
|
+
```yaml
|
|
118
|
+
outputs:
|
|
119
|
+
html:
|
|
120
|
+
pdf:
|
|
121
|
+
mode: print
|
|
122
|
+
label: Print PDF
|
|
123
|
+
placement: after
|
|
124
|
+
include: [guide.start, guide.configure]
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
An enabled mapping defaults to `mode: print`. Omit `include` to enable the action on all eligible pages, or set `exclude` to a list of document IDs. `placement` is `before` or `after` the existing Markdown actions. Set `pdf: false` in a page's frontmatter to suppress the control. Set `outputs.html.pdf: false` to disable it for the site.
|
|
128
|
+
|
|
129
|
+
This adds shared print scripts, a theme stylesheet, a small settings file, and any configured local fonts or logo. The same assets serve every page. It doesn't generate PDFs or additional print documents for individual pages, and the build doesn't need Chromium. The browser copies the current article into a separate branded print view and opens the print dialog. Readers choose Save as PDF. Allow that view to open if the browser blocks it as a pop-up.
|
|
130
|
+
|
|
131
|
+
The print view uses `outputs.pdf` styling, including its local stylesheet, fonts, paper settings, and optional cover. Set `outputs.html.pdf.style` to a named export target to reuse only that target's PDF styling. Its document list, publication, and content filter don't change the current page selection. For example, a `page-print` target can set `cover: false` while the manual uses a cover. Browser print views default to no cover or contents unless configured.
|
|
132
|
+
|
|
133
|
+
Website navigation, controls, and executable content aren't copied into the print view. The original page stays unchanged. The view waits for its fonts and images before opening the dialog, and retains **Print PDF** and **Close** controls afterward. Browser settings can affect backgrounds, pagination, and page furniture. Configured header/footer placeholders use browser CSS page-margin support, which varies by browser.
|
|
134
|
+
|
|
135
|
+
The browser's own Print command remains available without JavaScript and uses the ordinary site's print CSS. That fallback can be customized with `site.customCss` and `@media print`; it doesn't open the branded view.
|
|
136
|
+
|
|
137
|
+
## Publish an optional manual download
|
|
138
|
+
|
|
139
|
+
Generate a complete selected publication with the CLI only when you want a downloadable manual. Keep its export directory outside the site build destination. After generating `pdf/manual/publication.pdf`, build the site and copy the PDF into the deployment output:
|
|
140
|
+
|
|
141
|
+
```sh
|
|
142
|
+
npx --no-install shoalrun build docs.config.yaml site-dist
|
|
143
|
+
mkdir -p site-dist/downloads
|
|
144
|
+
cp pdf/manual/publication.pdf site-dist/downloads/manual.pdf
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Add an ordinary content, header, or footer link to `/downloads/manual.pdf`, and run your site's link checks after copying. This example assumes root hosting; place the file and link under the configured base path when using one. Deploy it with the site. A later site build replaces its output, so repeat the explicit copy as part of your deployment workflow.
|
|
148
|
+
|
|
149
|
+
Shoalrun doesn't automatically publish CLI export directories or create a full-manual download button. One optional manual file can serve the publication without prebuilding a PDF for every page. Use the same publication and customer profile for the site and manual.
|
|
150
|
+
|
|
151
|
+
## Offer direct downloads through a Node server
|
|
152
|
+
|
|
153
|
+
For generation when a reader clicks, use endpoint mode:
|
|
154
|
+
|
|
155
|
+
```yaml
|
|
156
|
+
outputs:
|
|
157
|
+
html:
|
|
158
|
+
pdf:
|
|
159
|
+
mode: endpoint
|
|
160
|
+
endpoint: /__shoalrun/pdf
|
|
161
|
+
label: Download PDF
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Build and run the output with `shoalrun serve`. The Node server automatically loads the prepared page inventory. The first request generates its PDF; subsequent requests generate it again. Requests are limited to one active generation and ten generation attempts per minute per server instance. Busy requests receive a retry response. There's no shared PDF cache.
|
|
165
|
+
|
|
166
|
+
The endpoint accepts only the page's opaque build-selected key. It can't select another profile, accept custom CSS, or print an arbitrary URL. It returns an attachment with `Cache-Control: no-store`. Mount the endpoint behind the same authentication as the site. Build-time audience selection isn't visitor authorization.
|
|
167
|
+
|
|
168
|
+
Endpoint page downloads use `outputs.pdf` styling and omit the publication cover and contents. Optional `outputs.html.pdf.style` selects a named export target's `pdf` settings, just as it does for browser print views. Only that styling applies; the target's document list, publication, and filter don't change the current page selection.
|
|
169
|
+
|
|
170
|
+
For a custom Node host, import `loadPdfRuntime` and `createPdfHttpHandler` from `@shoalrun/cli/pdf/server`. Mount the returned Web-standard handler at the runtime's endpoint; use its `authorize` callback or your existing authentication middleware. Keep `pdf-runtime.json` and `__shoalrun/pdf-data` out of public static serving. The built-in Node server protects those paths. Don't upload an endpoint-mode build to a generic static host.
|
|
171
|
+
|
|
172
|
+
## Check the result
|
|
173
|
+
|
|
174
|
+
Open `page.pdf` or `publication.pdf` in the export directory. Check the cover, fonts, long tables and code, page breaks, internal links, and bookmarks. Confirm that excluded edition content is absent. The adjacent manifest records publication identity, page order, input digests, and renderer details; it isn't a Content REST representation manifest. A failed export preserves an earlier PDF export directory.
|
|
175
|
+
|
|
176
|
+
For browser printing, open a page, activate **Print PDF**, and inspect the branded view and native print preview. Confirm that the selected page and release appear and that no page PDFs were generated in the site build. Check that the original page's tabs, details, and reader view remain unchanged.
|
|
177
|
+
|
|
178
|
+
For an endpoint action, follow **Download PDF** and confirm the selected page downloads. An endpoint link makes a normal same-origin navigation and download request; the server returns a readable error if generation fails.
|
|
179
|
+
|
|
180
|
+
## HTML, Markdown, and agents
|
|
181
|
+
|
|
182
|
+
HTML offers the optional browser print button or endpoint download link. Markdown retains the page's documentation and these instructions, without an interactive print control. The browser copies semantic article content into its print view. It shows tab panels and reader sections with their context and expands details without changing the source page. Browser-only controls and active elements aren't copied. CLI and endpoint PDF rendering expand those components into labeled static content. Reader views don't exclude their sections; use build filters and feature requirements for exclusion. Math retains its rendered expression, and code retains its text.
|
|
183
|
+
|
|
184
|
+
Agents can run the same export command with explicit publication coordinates and profile, then read the PDF artifact manifest to identify the selection. PDFs are separate delivery artifacts: enabling them doesn't add a new Content REST representation or a public link to every publication export.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: guide.pdf-export
|
|
3
|
+
title: Export styled PDFs
|
|
4
|
+
summary: Export a page or publication as a PDF and offer an optional page download.
|
|
5
|
+
type: how-to
|
|
6
|
+
area: publishing
|
|
7
|
+
subarea: publishing-builds
|
|
8
|
+
canonical: /publish/pdf
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Export styled PDFs
|
|
12
|
+
|
|
13
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
14
|
+
|
|
15
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
16
|
+
|
|
17
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Publish and maintain > Export styled PDFs
|
|
18
|
+
|
|
19
|
+
**Updated: 2026-11-06.**
|
|
20
|
+
|
|
21
|
+
**Available since: 0.1.0-beta.1.**
|
|
22
|
+
|
|
23
|
+
Parent page: [Full Markdown page](/publish/pdf.md)
|
|
24
|
+
|
|
25
|
+
Offer **Print PDF** on a static site using the visitor's browser. Site builds generate no page PDFs or extra print documents. When you want a downloadable full manual, export it explicitly through the CLI with your own fonts, colors, paper size, and print layout. A Node host can also offer direct page PDF downloads on request.
|
|
26
|
+
|
|
27
|
+
## Apply print styling
|
|
28
|
+
|
|
29
|
+
Set defaults under `outputs.pdf`; a target's `pdf` settings override them. Paths resolve from the configuration file that declares them.
|
|
30
|
+
|
|
31
|
+
```yaml
|
|
32
|
+
outputs:
|
|
33
|
+
pdf:
|
|
34
|
+
stylesheet: ./styles/print.css
|
|
35
|
+
size: Letter
|
|
36
|
+
margins: { top: 20mm, right: 18mm, bottom: 20mm, left: 18mm }
|
|
37
|
+
footer: "{title} | {page} / {pages}"
|
|
38
|
+
logo: ./assets/logo.svg
|
|
39
|
+
subtitle: Operations manual
|
|
40
|
+
fonts:
|
|
41
|
+
- family: Documentation
|
|
42
|
+
source: ./assets/documentation.woff2
|
|
43
|
+
weight: "400"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Use a local font that you're allowed to embed. Reference the registered family in your stylesheet:
|
|
47
|
+
|
|
48
|
+
```css title="styles/print.css"
|
|
49
|
+
:root {
|
|
50
|
+
--pdf-accent: #245849;
|
|
51
|
+
--pdf-text: #172722;
|
|
52
|
+
--pdf-muted: #53665e;
|
|
53
|
+
--pdf-font: Documentation, Arial, sans-serif;
|
|
54
|
+
--pdf-code-font: monospace;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
h2 { break-after: avoid; }
|
|
58
|
+
.pdf-chapter + .pdf-chapter { break-before: page; }
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The stylesheet can customize the cover, contents, chapters, tables, code, and page breaks. It can't load URLs or import other stylesheets; register fonts explicitly. CLI exports require staged local images; remote images fail instead of being fetched. Browser print views load the images referenced by the current page.
|
|
62
|
+
|
|
63
|
+
Paper sizes are `A4`, `Letter`, `Legal`, `A3`, and `A5`. Margins accept `mm`, `cm`, `in`, or `px`. Header and footer fields accept escaped text with `{title}`, `{page}`, and `{pages}` placeholders; they use a separate small-text layout and don't inherit body CSS. `timeout` bounds rendering to 1,000–120,000 milliseconds; its default is 30,000.
|
|
64
|
+
|
|
65
|
+
Publication exports enable the cover and linked table of contents by default; a single explicitly requested page omits them. Override `cover` and `toc` when needed. The contents links don't show printed page numbers. `bookmarks` defaults to true, using Chromium's experimental PDF outline support. Verify bookmarks in your browser's output; tagging doesn't establish PDF/UA compliance.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: guide.pdf-export
|
|
3
|
+
title: Export styled PDFs
|
|
4
|
+
summary: Export a page or publication as a PDF and offer an optional page download.
|
|
5
|
+
type: how-to
|
|
6
|
+
area: publishing
|
|
7
|
+
subarea: publishing-builds
|
|
8
|
+
canonical: /publish/pdf
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Export styled PDFs
|
|
12
|
+
|
|
13
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
14
|
+
|
|
15
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
16
|
+
|
|
17
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Publish and maintain > Export styled PDFs
|
|
18
|
+
|
|
19
|
+
**Updated: 2026-11-06.**
|
|
20
|
+
|
|
21
|
+
**Available since: 0.1.0-beta.1.**
|
|
22
|
+
|
|
23
|
+
Parent page: [Full Markdown page](/publish/pdf.md)
|
|
24
|
+
|
|
25
|
+
Offer **Print PDF** on a static site using the visitor's browser. Site builds generate no page PDFs or extra print documents. When you want a downloadable full manual, export it explicitly through the CLI with your own fonts, colors, paper size, and print layout. A Node host can also offer direct page PDF downloads on request.
|
|
26
|
+
|
|
27
|
+
## Check the result
|
|
28
|
+
|
|
29
|
+
Open `page.pdf` or `publication.pdf` in the export directory. Check the cover, fonts, long tables and code, page breaks, internal links, and bookmarks. Confirm that excluded edition content is absent. The adjacent manifest records publication identity, page order, input digests, and renderer details; it isn't a Content REST representation manifest. A failed export preserves an earlier PDF export directory.
|
|
30
|
+
|
|
31
|
+
For browser printing, open a page, activate **Print PDF**, and inspect the branded view and native print preview. Confirm that the selected page and release appear and that no page PDFs were generated in the site build. Check that the original page's tabs, details, and reader view remain unchanged.
|
|
32
|
+
|
|
33
|
+
For an endpoint action, follow **Download PDF** and confirm the selected page downloads. An endpoint link makes a normal same-origin navigation and download request; the server returns a readable error if generation fails.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: guide.pdf-export
|
|
3
|
+
title: Export styled PDFs
|
|
4
|
+
summary: Export a page or publication as a PDF and offer an optional page download.
|
|
5
|
+
type: how-to
|
|
6
|
+
area: publishing
|
|
7
|
+
subarea: publishing-builds
|
|
8
|
+
canonical: /publish/pdf
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Export styled PDFs
|
|
12
|
+
|
|
13
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
14
|
+
|
|
15
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
16
|
+
|
|
17
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Publish and maintain > Export styled PDFs
|
|
18
|
+
|
|
19
|
+
**Updated: 2026-11-06.**
|
|
20
|
+
|
|
21
|
+
**Available since: 0.1.0-beta.1.**
|
|
22
|
+
|
|
23
|
+
Parent page: [Full Markdown page](/publish/pdf.md)
|
|
24
|
+
|
|
25
|
+
Offer **Print PDF** on a static site using the visitor's browser. Site builds generate no page PDFs or extra print documents. When you want a downloadable full manual, export it explicitly through the CLI with your own fonts, colors, paper size, and print layout. A Node host can also offer direct page PDF downloads on request.
|
|
26
|
+
|
|
27
|
+
## Export a page or publication
|
|
28
|
+
|
|
29
|
+
Run the page command with the page's stable document ID:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npx --no-install shoalrun export docs.config.yaml --format pdf --document guide.start --out pdf/page
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Omit `--document` to export a complete publication:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
npx --no-install shoalrun export docs.config.yaml --format pdf --out pdf/manual
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If several publications are enabled, select one explicitly. These product and version values are examples:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npx --no-install shoalrun export docs.config.yaml --format pdf --product core --channel production --version v2 --language en --out pdf/core-v2
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Pass `--profile customer.yaml` when exporting a [customer edition](https://www.shoalrun.com/publish/deployment-profiles.md). PDF selection uses the target's `contentFilter`, or the site's `site.contentFilter` when the target doesn't specify one. Product, version, language, page access policy, and feature requirements apply before rendering. A missing or excluded explicitly requested page fails.
|
|
48
|
+
|
|
49
|
+
Publication chapters follow navigation order. Eligible pages outside navigation are appended in stable document-ID order and reported in diagnostics. A named export target can supply an explicit document order:
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
exports:
|
|
53
|
+
manual:
|
|
54
|
+
formats: [pdf]
|
|
55
|
+
documents: [guide.start, guide.configure]
|
|
56
|
+
pdf:
|
|
57
|
+
cover: true
|
|
58
|
+
toc: true
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Run that target with `--target manual`. PDF targets contain whole pages and use a separate PDF manifest. Export HTML and Markdown in another invocation when your application needs those representations too.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: guide.pdf-export
|
|
3
|
+
title: Export styled PDFs
|
|
4
|
+
summary: Export a page or publication as a PDF and offer an optional page download.
|
|
5
|
+
type: how-to
|
|
6
|
+
area: publishing
|
|
7
|
+
subarea: publishing-builds
|
|
8
|
+
canonical: /publish/pdf
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Export styled PDFs
|
|
12
|
+
|
|
13
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
14
|
+
|
|
15
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
16
|
+
|
|
17
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Publish and maintain > Export styled PDFs
|
|
18
|
+
|
|
19
|
+
**Updated: 2026-11-06.**
|
|
20
|
+
|
|
21
|
+
**Available since: 0.1.0-beta.1.**
|
|
22
|
+
|
|
23
|
+
Parent page: [Full Markdown page](/publish/pdf.md)
|
|
24
|
+
|
|
25
|
+
Offer **Print PDF** on a static site using the visitor's browser. Site builds generate no page PDFs or extra print documents. When you want a downloadable full manual, export it explicitly through the CLI with your own fonts, colors, paper size, and print layout. A Node host can also offer direct page PDF downloads on request.
|
|
26
|
+
|
|
27
|
+
## HTML, Markdown, and agents
|
|
28
|
+
|
|
29
|
+
HTML offers the optional browser print button or endpoint download link. Markdown retains the page's documentation and these instructions, without an interactive print control. The browser copies semantic article content into its print view. It shows tab panels and reader sections with their context and expands details without changing the source page. Browser-only controls and active elements aren't copied. CLI and endpoint PDF rendering expand those components into labeled static content. Reader views don't exclude their sections; use build filters and feature requirements for exclusion. Math retains its rendered expression, and code retains its text.
|
|
30
|
+
|
|
31
|
+
Agents can run the same export command with explicit publication coordinates and profile, then read the PDF artifact manifest to identify the selection. PDFs are separate delivery artifacts: enabling them doesn't add a new Content REST representation or a public link to every publication export.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: guide.pdf-export
|
|
3
|
+
title: Export styled PDFs
|
|
4
|
+
summary: Export a page or publication as a PDF and offer an optional page download.
|
|
5
|
+
type: how-to
|
|
6
|
+
area: publishing
|
|
7
|
+
subarea: publishing-builds
|
|
8
|
+
canonical: /publish/pdf
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Export styled PDFs
|
|
12
|
+
|
|
13
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
14
|
+
|
|
15
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
16
|
+
|
|
17
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Publish and maintain > Export styled PDFs
|
|
18
|
+
|
|
19
|
+
**Updated: 2026-11-06.**
|
|
20
|
+
|
|
21
|
+
**Available since: 0.1.0-beta.1.**
|
|
22
|
+
|
|
23
|
+
Parent page: [Full Markdown page](/publish/pdf.md)
|
|
24
|
+
|
|
25
|
+
Offer **Print PDF** on a static site using the visitor's browser. Site builds generate no page PDFs or extra print documents. When you want a downloadable full manual, export it explicitly through the CLI with your own fonts, colors, paper size, and print layout. A Node host can also offer direct page PDF downloads on request.
|
|
26
|
+
|
|
27
|
+
## Offer browser page printing
|
|
28
|
+
|
|
29
|
+
The action is off by default. For a static host, enable browser printing:
|
|
30
|
+
|
|
31
|
+
```yaml
|
|
32
|
+
outputs:
|
|
33
|
+
html:
|
|
34
|
+
pdf:
|
|
35
|
+
mode: print
|
|
36
|
+
label: Print PDF
|
|
37
|
+
placement: after
|
|
38
|
+
include: [guide.start, guide.configure]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
An enabled mapping defaults to `mode: print`. Omit `include` to enable the action on all eligible pages, or set `exclude` to a list of document IDs. `placement` is `before` or `after` the existing Markdown actions. Set `pdf: false` in a page's frontmatter to suppress the control. Set `outputs.html.pdf: false` to disable it for the site.
|
|
42
|
+
|
|
43
|
+
This adds shared print scripts, a theme stylesheet, a small settings file, and any configured local fonts or logo. The same assets serve every page. It doesn't generate PDFs or additional print documents for individual pages, and the build doesn't need Chromium. The browser copies the current article into a separate branded print view and opens the print dialog. Readers choose Save as PDF. Allow that view to open if the browser blocks it as a pop-up.
|
|
44
|
+
|
|
45
|
+
The print view uses `outputs.pdf` styling, including its local stylesheet, fonts, paper settings, and optional cover. Set `outputs.html.pdf.style` to a named export target to reuse only that target's PDF styling. Its document list, publication, and content filter don't change the current page selection. For example, a `page-print` target can set `cover: false` while the manual uses a cover. Browser print views default to no cover or contents unless configured.
|
|
46
|
+
|
|
47
|
+
Website navigation, controls, and executable content aren't copied into the print view. The original page stays unchanged. The view waits for its fonts and images before opening the dialog, and retains **Print PDF** and **Close** controls afterward. Browser settings can affect backgrounds, pagination, and page furniture. Configured header/footer placeholders use browser CSS page-margin support, which varies by browser.
|
|
48
|
+
|
|
49
|
+
The browser's own Print command remains available without JavaScript and uses the ordinary site's print CSS. That fallback can be customized with `site.customCss` and `@media print`; it doesn't open the branded view.
|