morningman opened a new pull request, #4558: URL: https://github.com/apache/doris-website/pull/4558
Retire the scheduled PDF job that fails while launching Chromium and provide a local command for exporting a selected documentation version from the working tree. `Cron Generate Pdf` has already been disabled in GitHub Actions; this PR removes its scheduled workflow definition. ## Changes and review - **Goal:** Replace automatic Dev-only online crawling with an explicit local `yarn docs:pdf --version <version>` command. Support Dev/current, active releases, and historical source directories, with English and Chinese selection. - **Scope:** Retire the cron workflow, update its existing security-test coverage, and add the CLI, renderer, verifier, setup guide, and shared documentation inventory. PDF binaries remain local artifacts. - **Information architecture:** Read the selected version's source root and sidebar. Preserve sidebar order, append other source pages, and use the native Docusaurus slug rules. Documentation content and active-version configuration are preserved. - **Paths and links:** Produce stable version/language filenames, a manifest, and SHA-256 checksums. Restore document/heading links across print batches and add contents/bookmarks. - **Runtime:** Use local Pandoc, Python/pypdf, curl, and an installed Chrome/Chromium with its normal sandbox. Expand tabs/details and navigation cards; retain animation URLs. Fail on unsupported components and missing images, with an explicit placeholder option for the latter. No site UI changes are included. - **Validation:** The command, source inventory, content conversion, workflow security checks, and real PDF samples were tested as listed below. - **Other findings:** No additional blocking issues found. Runtime dependencies and the working-tree snapshot behavior are documented. The separate manual GitHub PDF workflow remains available. ## Usage ```sh python3 -m venv tmp/pdfs/.venv tmp/pdfs/.venv/bin/python -m pip install -r scripts/docs-pdf/requirements.txt yarn docs:pdf --list-versions yarn docs:pdf --version 4.x yarn docs:pdf --version dev --locale zh-CN yarn docs:pdf --version 2.1 --locale en --output ./output/pdf/2.1-english ``` The default output directory is `output/pdf/docs/<version>/`. Chrome and the repository's Python virtual environment are detected automatically; `--chrome` and `--python` provide overrides. ## Validation details - 7 Node tests passed for selection/validation, current-version aliases, native slugs, sidebars, MDX cards/tabs/details, and real inventories for all six versions in both languages. - 18 existing workflow security/authorization tests passed after removing the retired cron job from their expected workflow list. - Generated four sample PDFs: 4.x English/Chinese, Dev Chinese, and 2.1 English. All passed hash, page/document count, bookmark, internal-link, and extracted-text verification with zero missing images. Rendered representative pages were visually inspected. - Verified that `--resume` retains the other locale, checksum corruption is rejected, and a missing Chrome executable fails before output creation. - `git diff --check` passed. The archive-page PR #4555 is being kept separate: its export tooling is moved here, and both PRs use the identical shared inventory helper. ## Versions - [x] dev - [x] 4.x - [x] 3.x - [x] 2.1 or older (not covered by version/language sync gate) ## Languages - [x] Chinese - [x] English ## Docs Checklist - [x] Checked by AI - [x] Test Cases Built - [x] Updated required version and language counterparts, or explained why not - [x] If only one language changed, confirmed whether source/translation counterparts need sync -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
