feat: auto-install pandoc in build.sh for Cloudflare Pages#139
Merged
pierzchala-m merged 2 commits intomasterfrom Mar 24, 2026
Merged
feat: auto-install pandoc in build.sh for Cloudflare Pages#139pierzchala-m merged 2 commits intomasterfrom
pierzchala-m merged 2 commits intomasterfrom
Conversation
Some markdown files (from WikiGDrive) use markup: 'pandoc' in front matter for pandoc-specific features like lettered sub-lists. Pandoc is not available in the Cloudflare Pages build environment. Add ensure_pandoc() to build.sh that: - Skips download if pandoc is already on PATH - Downloads pandoc 3.6.4 static binary from GitHub releases - Detects OS/arch (Linux amd64/arm64, macOS x86_64/arm64) - Extracts to .pandoc/ and prepends to PATH Also adds .pandoc/ to .gitignore.
|
👋 @wreiske, Your documentation has been pushed to https://docs-qa.med-web.com/139-merge/ for commit 3d7c6b6 |
Deploying eh-docs with
|
| Latest commit: |
f220eb9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://02fe18b9.eh-docs.pages.dev |
| Branch Preview URL: | https://feature-auto-install-pandoc.eh-docs.pages.dev |
Deploying wc-docs with
|
| Latest commit: |
f220eb9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://92b30353.wc-docs.pages.dev |
| Branch Preview URL: | https://feature-auto-install-pandoc.wc-docs.pages.dev |
Member
Author
There was a problem hiding this comment.
Pull request overview
Adds automatic provisioning of the Pandoc binary during site builds so Hugo can render Markdown files that specify markup: 'pandoc' in front matter—addressing Cloudflare Pages environments where Pandoc isn’t preinstalled.
Changes:
- Introduces
ensure_pandoc()inbuild.shto detect/download Pandoc and prepend it toPATH. - Adds
.pandoc/to.gitignoreso downloaded artifacts aren’t committed.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| build.sh | Adds an ensure_pandoc() bootstrap step that downloads Pandoc when missing to support Hugo’s pandoc-based rendering. |
| .gitignore | Ignores the local .pandoc/ installation directory produced by the build script. |
- Accept both aarch64 and arm64 for Linux ARM64 detection - Use curl with wget fallback instead of hard wget dependency - Add SHA256 checksum verification for downloaded binaries - Only run ensure_pandoc when wc/eh target is specified - Fix macOS ZIP nested directory extraction - Check cached PANDOC_DIR before re-downloading - Use case statement instead of declare -A for bash 3.2 compat
|
👋 @wreiske, Your documentation has been pushed to https://docs-qa.med-web.com/139-merge/ for commit f4f5fc4 |
pierzchala-m
approved these changes
Mar 24, 2026
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.

Problem
15 markdown files (synced from Google Drive via WikiGDrive) declare
markup: 'pandoc'in their front matter. This tells Hugo to use pandoc as an external renderer — required for pandoc-specific features like lettered sub-lists (a.,b.,c.→<ol type="a">).Pandoc is not available in the Cloudflare Pages build environment, causing these pages to fail rendering.
Solution
Add an
ensure_pandoc()function tobuild.shthat runs before Hugo:$PATH(local dev, self-hosted runners).pandoc/and prepends to$PATH$PANDOC_DIRenv var allows CI to override the install location for cachingAlso adds
.pandoc/to.gitignore.Affected files with
markup: 'pandoc'15 files
content/resources/intro-to-the-system/system-anatomy.mdcontent/rapid-deployment/review-sessions/review-session-pre-placement.mdcontent/features/system-administration/interfaces/outbound-interface-install-instructions.mdcontent/features/system-administration/interfaces/query-odg-integration.mdcontent/features/system-administration/system-controls/new-provider-configuration-recommendations.mdcontent/features/document-management/scanning-and-indexing/scanner-cleaning.mdcontent/features/document-management/imaging/inbound-application-installation-dicomd.mdcontent/features/system-administration/system-controls/terminated-provider-configuration-recommendations.mdcontent/features/financial-functionality/viewing-expired-fee-schedules.mdcontent/features/quality-of-care/measures/quality-measure-specifications-and-recommended-workflows/cms-165-controlling-high-blood-pressure.mdcontent/features/document-management/send-document.mdcontent/features/quality-of-care/measures/quality-measure-specifications-and-recommended-workflows/cms-122-diabetes-hemoglobin-a1c-hba1c-poor-control-greater9.mdcontent/features/quality-of-care/measures/quality-measure-specifications-and-recommended-workflows/cms-124-cervical-cancer-screening.mdcontent/features/quality-of-care/measures/quality-measure-specifications-and-recommended-workflows/cms-2-preventive-care-and-screening-screening-for-depression-and-follow-up-plan-workflow.mdcontent/features/fax-manager/incoming-file-fax-q-set-up-and-documentation.mdTesting
./build.sh ehcompletes successfully (1942 pages)<ol type="a">for lettered sub-lists)