Repository navigation
Add a committed export showcase and link it from the guides - #8
Merged
Merged
Conversation
A six-document handbook under examples/export/showcase/ is exported by showcase.config.mjs into showcase-output/, which is committed so the HTML, PDF and Word results can be opened without building anything. The root README, the export guide and the examples README link the sample and describe what it demonstrates: callouts, badges, split table cells, a derived summary table, a reworded embed, a footnote, an image, a landscape table, page breaks, a cover and a numbered contents page. The page date is fixed so every build produces the same files. tests/scripts/export-showcase.mjs rebuilds the sample into a temporary directory and compares it with the committed copy, text outputs byte for byte and PDF and Word by size, and runs as the fourth check in npm run test:scripts. The output directory is excluded from prettier.
The site stylesheet keeps `pre code` at `white-space: pre` because a code block can scroll on screen. That child rule also won on paper, over the print rule that lets `pre` wrap, so a single code line wider than the page overflowed it and Chrome scaled the whole document down until the line fit. In a bound volume every page shrank, the page count no longer matched the per-document measurements and the build refused to number the contents. The print rules now make `pre code` inherit the wrapping from `pre`. The stylesheet fixture is refreshed, a print-styles test guards the rule and the API reference names the behaviour.
…ADME The six showcase documents now read like a real handbook: seven endpoints with parameter and response tables and JSON samples, request samples in curl, Node.js and Python, a conditional-request example, request costs, plan changes, an error catalogue with a handling sample, and four dated releases with an upcoming-changes table. Sections flow within a document instead of each starting a new page, so the bound volume is twenty-eight filled pages rather than twenty-six mostly empty ones, and date columns have a minimum width so they do not wrap. The cudoc-export README gains a table that links one document and the bound volume in every format, and the export guide describes the sample as it now is.
An inline image in the Word output was scaled to the content width alone, so a tall figure could run past the bottom of the page. The print stylesheet caps an image at the content height as well; the Word writer now applies the same bound, keeping the proportions, and the reference says so.
cudoment
added a commit
that referenced
this pull request
Oct 27, 2026
Add a committed export showcase and link it from the guides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
examples/export/showcase/: a six-document handbook for a fictional weather API, written in plain Markdown with the constructs the export guide describes (callouts incl. a registeredsuccesstype, badges, a split list cell, a derived endpoint summary table, an embed reworded withreplace, a footnote, an image, a seven-column table, acudoc-pagebreakfence).examples/export/showcase.config.mjs: one configuration that exports it as a site, per-document PDF and Word files and a bound volume with a cover and a numbered contents page;npm run showcaseinexamples/exportrebuilds it.examples/export/showcase-output/: the committed result (35 files, about 2 MB) sonorthlight-handbook.pdfand.docxopen from GitHub andindex.htmlopens from a clone.docs/export.mdgains "A complete example";examples/README.mdandtests/scripts/README.mddescribe it.tests/scripts/export-showcase.mjs: rebuilds the sample into a temporary directory and compares it with the committed copy (text byte for byte, PDF and Word by size). Added as the fourth check innpm run test:scripts; the output directory is excluded from prettier.Notes
page.dateis fixed so the output is identical between builds. The HTML carries the generator version, so the sample has to be regenerated at each release; the check fails until it is.cudoc checkon the six documents reports no problems, the freshness check passes on the committed output,npm run format:checkpasses, and the PDF pages (cover, contents, split table, landscape table, page break, footnote, callouts, summary table) were inspected.