@shoalrun/cli 0.1.0-alpha.19 → 1.0.0
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 +30 -0
- package/CODE-REFERENCES.md +137 -0
- package/README.md +19 -6
- package/adapters/python/requirements.txt +1 -0
- package/adapters/python/shoalrun_reference.py +234 -0
- package/agent-docs/.well-known/shoalrun/navigation/project-updates-50f26fe22670.txt +7 -3
- package/agent-docs/SNAPSHOT.json +5 -5
- package/agent-docs/about.md +3 -3
- package/agent-docs/api-docs/code-reference-settings.md +160 -0
- package/agent-docs/api-docs/code-reference-settings.sections/catalog-settings.md +50 -0
- package/agent-docs/api-docs/code-reference-settings.sections/complete-reference-page.md +46 -0
- package/agent-docs/api-docs/code-reference-settings.sections/converter-snapshot.md +58 -0
- package/agent-docs/api-docs/code-reference-settings.sections/descriptions-type-links-and-source-links.md +40 -0
- package/agent-docs/api-docs/code-reference-settings.sections/html-markdown-and-agents.md +38 -0
- package/agent-docs/api-docs/code-reference-settings.sections/metadata-and-selection.md +38 -0
- package/agent-docs/api-docs/code-reference-settings.sections/publication-sources.md +54 -0
- package/agent-docs/api-docs/code-reference-settings.sections/python-adapter-limits.md +38 -0
- package/agent-docs/api-docs/code-reference-settings.sections/related-reading.md +32 -0
- package/agent-docs/api-docs/code-reference-settings.sections/symbol-fields.md +56 -0
- package/agent-docs/api-docs/code-references.md +143 -0
- 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/code-api-references.md +44 -0
- package/agent-docs/changelog/pdf-custom-languages.md +48 -0
- package/agent-docs/changelog.md +17 -1
- package/agent-docs/cli.md +11 -1
- package/agent-docs/cli.sections/audit-a-project-and-api-sources.md +1 -1
- package/agent-docs/cli.sections/author-pages.md +1 -1
- package/agent-docs/cli.sections/build-and-serve.md +1 -1
- package/agent-docs/cli.sections/inspect-config-and-operations.md +1 -1
- package/agent-docs/cli.sections/npm-scripts-in-this-repository.md +1 -1
- package/agent-docs/cli.sections/related-reading.md +1 -1
- package/agent-docs/cli.sections/search-and-chat.md +1 -1
- package/agent-docs/cli.sections/start-a-project.md +1 -1
- package/agent-docs/cli.sections/validate-code-reference-snapshots.md +41 -0
- package/agent-docs/cli.sections/working-tree-authoring-tools.md +1 -1
- package/agent-docs/config/apis.md +5 -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/config.md +2 -2
- 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 +1009 -356
- package/agent-docs/features.md +6 -2
- package/agent-docs/index.md +2 -2
- package/agent-docs/provenance.json +6 -6
- package/agent-docs/publish/api-references.md +3 -1
- package/agent-docs/publish/api-references.sections/author-the-reference-page.md +3 -1
- package/agent-docs/publish/api-references.sections/build-and-verify-the-output.md +3 -1
- package/agent-docs/publish/api-references.sections/inspect-the-machine-readable-contract.md +3 -1
- package/agent-docs/publish/api-references.sections/next-steps.md +3 -1
- package/agent-docs/publish/api-references.sections/preview-a-small-api-reference.md +3 -1
- package/agent-docs/publish/api-references.sections/put-the-spec-in-your-project.md +3 -1
- package/agent-docs/publish/api-references.sections/register-the-operation.md +3 -1
- package/agent-docs/publish/api-references.sections/related-reading.md +3 -1
- package/agent-docs/publish/api-references.sections/review-imported-content-before-publishing.md +3 -1
- package/agent-docs/publish/api-references.sections/what-readers-get.md +3 -1
- 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 +9 -5
- package/agent-docs/styling/themes.md +7 -3
- 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 +2 -0
- package/dist/artifact-bundle.js +13 -3
- 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/cli-discovery.d.ts +1 -1
- package/dist/cli-discovery.js +1 -0
- package/dist/cli.js +7 -0
- package/dist/code-reference-model.d.ts +85 -0
- package/dist/code-reference-model.js +73 -0
- package/dist/code-references.d.ts +23 -0
- package/dist/code-references.js +371 -0
- package/dist/compiler-config.d.ts +1 -0
- package/dist/compiler.d.ts +4 -2
- package/dist/compiler.js +33 -7
- package/dist/config.js +1 -1
- 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 +2 -0
- package/dist/content-workspace.d.ts +1 -0
- package/dist/content-workspace.js +2 -0
- package/dist/fonts.d.ts +9 -0
- package/dist/fonts.js +58 -3
- 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-materialization.js +3 -2
- package/dist/page-renderer.d.ts +1 -0
- package/dist/page-renderer.js +8 -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/publication-render.d.ts +2 -1
- package/dist/publication-render.js +2 -2
- package/dist/representation-tree.js +5 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.js +35 -8
- package/dist/vercel.js +6 -0
- package/examples/code-references/content/start.md +53 -0
- package/examples/code-references/docs.config.yaml +262 -0
- package/examples/code-references/python/orchard/__init__.py +11 -0
- package/examples/code-references/python/orchard/client.py +212 -0
- package/examples/code-references/python/orchard/errors.py +31 -0
- package/examples/code-references/python/orchard/models.py +69 -0
- package/examples/code-references/python/orchard/pagination.py +39 -0
- package/examples/code-references/reference.json +1244 -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 +11 -2
- package/schemas/code-reference.schema.json +306 -0
- package/skills/shoalrun-author/SKILL.md +6 -0
- package/skills/shoalrun-author/references/code-api-references.md +15 -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 +64 -3
|
@@ -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.
|
|
@@ -0,0 +1,46 @@
|
|
|
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 direct downloads through a Node server
|
|
28
|
+
|
|
29
|
+
For generation when a reader clicks, use endpoint mode:
|
|
30
|
+
|
|
31
|
+
```yaml
|
|
32
|
+
outputs:
|
|
33
|
+
html:
|
|
34
|
+
pdf:
|
|
35
|
+
mode: endpoint
|
|
36
|
+
endpoint: /__shoalrun/pdf
|
|
37
|
+
label: Download PDF
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
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.
|
|
41
|
+
|
|
42
|
+
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.
|
|
43
|
+
|
|
44
|
+
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.
|
|
45
|
+
|
|
46
|
+
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.
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
## Prerequisites
|
|
28
|
+
|
|
29
|
+
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`.
|
|
30
|
+
|
|
31
|
+
For example, on macOS with Chrome installed in Applications:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
export SHOALRUN_PDF_BROWSER="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
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.
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
## Publish an optional manual download
|
|
28
|
+
|
|
29
|
+
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:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npx --no-install shoalrun build docs.config.yaml site-dist
|
|
33
|
+
mkdir -p site-dist/downloads
|
|
34
|
+
cp pdf/manual/publication.pdf site-dist/downloads/manual.pdf
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
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.
|
package/agent-docs/publish.md
CHANGED
|
@@ -36,6 +36,8 @@ Review the generated HTML, Markdown, and `dist/documents.json`. A build replaces
|
|
|
36
36
|
|
|
37
37
|
Choose a hosting route based on the artifacts and server features your site needs.
|
|
38
38
|
|
|
39
|
+
For [page printing](https://www.shoalrun.com/publish/pdf.md), static sites use the visitor's browser and generate no page PDFs or extra print documents. Optionally publish a full-manual CLI export as a deliberate download. Direct endpoint downloads need a Node host with Chromium; don't expose their prepared private inputs through generic static serving.
|
|
40
|
+
|
|
39
41
|
| Hosting route | What to deploy |
|
|
40
42
|
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
41
43
|
| [Vercel](https://www.shoalrun.com/publish/vercel.md) | The `.vercel/output/` bundle generated by the installed CLI. |
|
|
@@ -19,7 +19,7 @@ Breadcrumbs: [Reference](https://www.shoalrun.com/cli.md) > Commands > Bundled a
|
|
|
19
19
|
|
|
20
20
|
**Updated: 2026-11-05.**
|
|
21
21
|
|
|
22
|
-
Shoalrun ships
|
|
22
|
+
Shoalrun ships portable skill folders under `framework/skills/`. Each folder contains a `SKILL.md` with instructions for an agent that can read files and run the Shoalrun CLI. A skill supplies guidance; it doesn't run a separate authoring service.
|
|
23
23
|
|
|
24
24
|
These are authoring skills for Shoalrun. The build doesn't create a reader-side skill for each published site. Agents reading a generated site use its Markdown twins, `/llms.txt`, and `/documents.json`. A non-interactive skill builder is a [non-goal](https://www.shoalrun.com/non-goals.md): skill creation and maintenance need guidance from a human expert.
|
|
25
25
|
|
|
@@ -34,12 +34,16 @@ Each skill supplies instructions for a specific part of the authoring workflow.
|
|
|
34
34
|
| `shoalrun-recipes` | Write task-oriented how-tos as complete recipes, reuse ingredients where helpful, and configure cookbook choices. |
|
|
35
35
|
| `shoalrun-component-author` | Create trusted [custom components](https://www.shoalrun.com/author/components/custom.md), validate their schemas and shared content, and review HTML/Markdown parity. |
|
|
36
36
|
| `shoalrun-walkthrough` | Turn notes, a tutorial, or project code into a [walkthrough](https://www.shoalrun.com/author/components/walkthroughs.md) that explains code step by step. |
|
|
37
|
+
| `shoalrun-brand` | Apply website branding through themes, fonts, local assets, and CSS, then check contrast and interactive states. |
|
|
38
|
+
| `shoalrun-pdf` | Style and export pages or publications as [PDFs](https://www.shoalrun.com/publish/pdf.md), configure optional downloads, and inspect actual PDF output. Includes a print design reference and stylesheet starter. |
|
|
37
39
|
|
|
38
40
|
Each folder name matches its skill name. For example, the author skill's entry file is `framework/skills/shoalrun-author/SKILL.md`. Installation locations depend on the agent. [Use the bundled agent skills](https://www.shoalrun.com/contribute/agent-skills.md) describes choosing and invoking one.
|
|
39
41
|
|
|
40
42
|
## Workflow behavior
|
|
41
43
|
|
|
42
|
-
The setup skill uses `shoalrun init` to create a project from the bundled `minimal` or `api-docs` starter, then uses `config validate`, `build`, and `dev` to check the result. The author skill uses stable IDs and project config provenance so edits stay attached to the intended publication. The walkthrough skill chooses a mode and layout, prefers code taken from project files, and checks each step's highlight. The recipes skill starts from a reader goal and success check, reuses ingredient source when useful, and distinguishes authoring from browser selection.
|
|
44
|
+
The setup skill uses `shoalrun init` to create a project from the bundled `minimal` or `api-docs` starter, then uses `config validate`, `build`, and `dev` to check the result. The author skill uses stable IDs and project config provenance so edits stay attached to the intended publication. The walkthrough skill chooses a mode and layout, prefers code taken from project files, and checks each step's highlight. The recipes skill starts from a reader goal and success check, reuses ingredient source when useful, and distinguishes authoring from browser selection.
|
|
45
|
+
|
|
46
|
+
The branding skill checks website surfaces and interactive states. The PDF skill checks print layout, exact publication/profile selection, links, fonts, and rendered PDF pages. Static sites use browser page printing; downloadable manuals are optional CLI exports. Direct on-demand PDF downloads need a Node host. The skills ask the agent to inspect the outputs relevant to its task and leave deployment decisions with the site owner.
|
|
43
47
|
|
|
44
48
|
The author skill starts with project-wide discovery and policy reads, captures a task baseline, and edits ordinary working-tree files. It validates a separate capture and opens the matching snapshot review/preview. Required companions come from project policy; compiler success doesn't waive them. Existing local edits are included in the baseline rather than attributed to the new task. No extra authoring model key is needed. Explicit checked-plan clients can still use [Apply a checked edit plan](https://www.shoalrun.com/author/authoring-agent.md).
|
|
45
49
|
|
|
@@ -51,7 +55,7 @@ The skill is an instruction file, not a compiler feature or an automatic React-t
|
|
|
51
55
|
|
|
52
56
|
## Offline documentation
|
|
53
57
|
|
|
54
|
-
|
|
58
|
+
The skills can consult Shoalrun's bundled docs through a local, agent-neutral tool:
|
|
55
59
|
|
|
56
60
|
```sh
|
|
57
61
|
shoalrun docs search "API reference navigation"
|