Add PDF download link to slides doc page#19842
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a direct PDF download option to the documentation slides page and updates the docs build pipeline so the PDF is published as a static asset.
Changes:
- Added a “Download PDF”
LinkButtonon the slides documentation page. - Extended
build:slidesto copy the pre-generated PDF intopublic/slides/for static serving.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/src/content/docs/introduction/slides.mdx | Adds a new button linking to the published PDF slide deck. |
| docs/package.json | Updates the slide build script to also publish the PDF into the docs static assets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "prebuild": "npm run generate-agent-factory && npm run build:slides", | ||
| "build": "astro build", | ||
| "build:slides": "mkdir -p public/js && cp node_modules/mermaid/dist/mermaid.min.js public/js/ && npx @marp-team/marp-cli slides/index.md --html --allow-local-files --theme slides/gh-aw-theme.css -o public/slides/index.html", | ||
| "build:slides": "mkdir -p public/js && cp node_modules/mermaid/dist/mermaid.min.js public/js/ && npx @marp-team/marp-cli slides/index.md --html --allow-local-files --theme slides/gh-aw-theme.css -o public/slides/index.html && mkdir -p public/slides && cp slides/github-agentic-workflows.pdf public/slides/", |
There was a problem hiding this comment.
build:slides writes to public/slides/index.html before ensuring public/slides/ exists. In this repo docs/public/ currently has no slides/ directory, so this script can fail on a clean checkout. Create public/slides before running the Marp CLI (e.g., mkdir -p public/js public/slides up front) and then copy the PDF into the same directory.
| "build:slides": "mkdir -p public/js && cp node_modules/mermaid/dist/mermaid.min.js public/js/ && npx @marp-team/marp-cli slides/index.md --html --allow-local-files --theme slides/gh-aw-theme.css -o public/slides/index.html && mkdir -p public/slides && cp slides/github-agentic-workflows.pdf public/slides/", | |
| "build:slides": "mkdir -p public/js public/slides && cp node_modules/mermaid/dist/mermaid.min.js public/js/ && npx @marp-team/marp-cli slides/index.md --html --allow-local-files --theme slides/gh-aw-theme.css -o public/slides/index.html && cp slides/github-agentic-workflows.pdf public/slides/", |
The slides doc page only linked to the web-based Marp viewer but not to the pre-generated PDF in
docs/slides/.Changes
docs/src/content/docs/introduction/slides.mdx— Added a "Download PDF"LinkButtonpointing toslides/github-agentic-workflows.pdfdocs/package.json— Extendedbuild:slidesto copy the PDF intopublic/slides/so it's served as a static asset alongside the compiled HTMLOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.