Repository navigation
Include code examples and images from QuestPDF.DocumentationExamples - #71
Closed
DawidRobertNowak wants to merge 5 commits into
Closed
DawidRobertNowak wants to merge 5 commits into
DawidRobertNowak wants to merge 5 commits into
Conversation
Proof of concept on debug-area, background, border and rounded-corners: code blocks are replaced with `<<< @/snippets/...` exported from the tests, images are regenerated from the current library, and every image gets a description of the result instead of the alt text "example" (styled through the new `example` class). The update-examples workflow exports snippets and images in CI, so no local checkout of QuestPDF is needed.
DawidRobertNowak
force-pushed
the
docs/snippets-from-examples
branch
from
October 27, 2026 12:04
72fd2a1 to
04ce5d6
Compare
DawidRobertNowak
changed the base branch from
docs/rotate-layout-method-names
to
main
October 27, 2026 12:10
Contributor
Author
|
Closing in favour of QuestPDF/QuestPDF#1493, which exports the code snippets and images with a different approach. |
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.
Code examples on four pages (debug-area, background, border, rounded-corners) are now included from the QuestPDF.DocumentationExamples tests instead of being copied by hand, so the code on the page is the code that generates the image next to it.
How it works
#region docs:<name>.tools/export-documentation-snippets.cs(QuestPDF repository) exports it todocs/snippets/, runs the examples and refreshes the images on pages that include snippets.<<< @/snippets/<name>.cs{lines csharp}; the llms.txt plugin expands it, so the.mdversions contain the full code.Update examplesworkflow runs the export in CI and commits the result, so no local copy of the QuestPDF repository is needed.Also in this change
exampleclass..Shrink()is now visible in two examples where the image depends on it.