Skip to content

feat: add script to generate pdf from our markdown docs #1861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
bad6749
feat: add PDF generation script
sunng87 Jun 23, 2025
54abe42
fix: handle non-array sidebar items in generate-pdf.js
sunng87 Jun 23, 2025
dc304eb
fix: handle doc IDs processing in generate-pdf script
sunng87 Jun 23, 2025
31c4f03
feat: Enhance Docusaurus PDF generation script with improved markdown…
sunng87 Jun 23, 2025
2f2d25d
fix: declare docsSidebar outside try block to resolve reference error
sunng87 Jun 23, 2025
68a40aa
feat: add function to remove outbound links from markdown content
sunng87 Jun 23, 2025
88f963f
fix: use versioned sidebar for localized PDF generation
sunng87 Jun 24, 2025
d5a57e4
fix: remove URL removal regex to preserve plain text URLs
sunng87 Jun 24, 2025
8552f12
feat: add comprehensive help output for PDF generation script
sunng87 Jun 24, 2025
5917926
chore: update project files
sunng87 Jun 24, 2025
59ec858
chore: remove .env
sunng87 Jun 24, 2025
ce43527
fix: correct image paths for PDF generation using file:// URLs
sunng87 Jun 24, 2025
beaab05
fix: simplify image path resolution for PDF generation
sunng87 Jun 24, 2025
6ad919a
feat: Add debug output and Puppeteer security flags for local image l…
sunng87 Jun 24, 2025
517fca3
feat: convert images to base64 and remove debug output in PDF generation
sunng87 Jun 24, 2025
647a8d0
style: add responsive image CSS for PDF generation
sunng87 Jun 24, 2025
a281480
feat: add PDF table of contents with hierarchical structure and page …
sunng87 Jun 24, 2025
162da1c
refactor: remove TOC page and add PDF bookmarks for navigation
sunng87 Jun 24, 2025
839cd4d
fix: resolve pdf-lib bookmark generation error with proper object cre…
sunng87 Jun 24, 2025
5a36133
fix: remove problematic PDF bookmark generation code
sunng87 Jun 24, 2025
45a4ee2
feat: add PDF bookmarks matching sidebar structure
sunng87 Jun 24, 2025
9515e73
fix: replace incorrect bookmark implementation in PDF generation
sunng87 Jun 24, 2025
3336f64
fix: implement proper PDF bookmarks with PDFName import
sunng87 Jun 24, 2025
b50d9a2
feat: switch from pdf-lib to pdfkit for PDF generation
sunng87 Jun 24, 2025
7044821
refactor: replace pdf-lib with pdfkit in generate-pdf.js
sunng87 Jun 24, 2025
b2bf882
fix: replace deprecated PDFDocument.write with proper stream piping
sunng87 Jun 24, 2025
c938a2b
feat: add --skip-generation flag to combine existing PDFs
sunng87 Jun 24, 2025
e15b351
fix: replace deprecated PDFDocument.write with proper stream handling
sunng87 Jun 24, 2025
2d840f8
fix: resolve PDF merging issues with pdf-merger-js
sunng87 Jun 24, 2025
fa26a9f
fix: update pdf-merger-js import to use default import
sunng87 Jun 24, 2025
71ef5c9
feat: add table of contents with document titles to merged PDF
sunng87 Jun 24, 2025
447d4bc
feat: add --keep-temp option to preserve temporary PDF files
sunng87 Jun 24, 2025
7e5addc
feat: convert locale and blacklist from env vars to CLI options
sunng87 Jun 24, 2025
b811122
refactor: remove unused PDFDocument import and clean up code
sunng87 Jun 24, 2025
45fb8a9
feat: Add PDF bookmarks using pdf-lib for sidebar navigation
sunng87 Jun 24, 2025
2d9c1fe
fix: resolve PDF outline generation error with pdf-lib object handling
sunng87 Jun 24, 2025
226b70a
fix: Disable PDF outline generation to resolve circular reference error
sunng87 Jun 24, 2025
0e233aa
feat: replace pdf-lib with hummus-pdf-writer for PDF outline generation
sunng87 Jun 24, 2025
8f3cd1b
refactor: replace hummus-pdf-writer with pdf-lib for outlines
sunng87 Jun 24, 2025
4ad5661
fix: handle duplicate titles and prevent stack overflow in PDF outline
sunng87 Jun 24, 2025
1864eae
chore: update dependencies and devDependencies in package.json
sunng87 Jun 24, 2025
e9ccc38
refactor: remove pdf-lib and outline generation
sunng87 Jun 24, 2025
aa26c1d
feat: add --cover option to prepend PDF cover page
sunng87 Jun 24, 2025
7de9e1f
docs: update help text for cover option
sunng87 Jun 24, 2025
ac6b9c9
feat: add PDF bookmarks using pdftk via Docker with markdown titles
sunng87 Jun 25, 2025
b8276e3
feat: Update pdftk image and enhance PDF bookmark generation with sid…
sunng87 Jun 25, 2025
61a19f5
feat: Add whitelist and hierarchical filtering for PDF generation
sunng87 Jun 25, 2025
5399055
feat: add support for including index page when using whitelist
sunng87 Jun 25, 2025
4f05012
feat: preserve and style external hyperlinks in generated PDF
sunng87 Jun 25, 2025
908d8f4
feat: implement internal PDF bookmarks for cross-document links
sunng87 Jun 25, 2025
1197da1
refactor: improve internal link conversion for PDF bookmarks
sunng87 Jun 25, 2025
01a874a
refactor: handle Docusaurus .md links by stripping extension in link …
sunng87 Jun 25, 2025
6885ff4
refactor: remove internal links without valid mappings, keep link text
sunng87 Jun 25, 2025
b00471f
Merge branch 'main' into feature/doc-pdf
sunng87 Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .env

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.docusaurus
node_modules
node_modules/
pdf-build/
build
.envrc

Expand All @@ -10,5 +11,8 @@ build
*.swp
*.swo
*~
.aider*
.env


.temp_patch
Loading