Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions docs/architecture/current-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ The **PowerShell filesystem walk**, not `hugo list all`, creates the `guides`, `
| Guide | Recursively find `_index.md` under the configured content directory; keep a directory when that file's front matter has `type: guide` and `layout: root` and at least one accepted edition. Guide `id` is its path relative to the content directory. |
| Edition/version | Inspect immediate child directories of the guide. Keep one when it contains `index.md`, its layout is not `translations`, `history`, `root` or `details`, and its front matter has either `type: guide` or a `version` field. Use the `version` field as edition `id` when present; otherwise use the directory name. |
| Language | Collect languages from edition-root `index*.md` filenames and from recognised PDF suffixes. `index.md` means the configured default language; `index.<tag>.md` supplies `<tag>`. |
| PDF/download | Find `*.pdf` recursively inside the edition. A filename ending `.<language>.pdf` is assigned to that language; a PDF without a recognised suffix is assigned to the configured default language. Store its path relative to the edition and mark its inferred handling `supplied`. |
| PDF/download | Find `*.pdf` recursively inside the edition, plus any path declared in `<source>/pdf/<guide>/<edition>/pdf[.<lang>].yaml` `downloads`. A filename ending `.<language>.pdf` is assigned to that language; a PDF without a recognised suffix is assigned to the configured default language. Store its path relative to the edition with the declared handling, otherwise `supplied`. |
| Language direction | Record `direction` (or the older `languageDirection`) for each configured language in `wrapper.languageDirections`. |

For each collected language, the code reads the corresponding `index.md` or `index.<language>.md` body and infers `web` when populated, `pdf-only` when the body is empty but a matching PDF exists, `web` for the empty default-language source, or `fallback` to the default language otherwise. It also records required guide-root, history and translations wrapper files for active guide languages. These are the rules in the [source walk and entry construction](../../system/OpenGuidePlatform.PowerShell.GuideSiteBuild/Discovery/New-GuideSiteDiscovery.ps1); they describe what the code currently recognises, not a proposed content format.

Expand Down Expand Up @@ -64,7 +65,7 @@ The [build-stage script](../../system/OpenGuidePlatform.PowerShell.GuideSiteBuil

## PDF evidence and preservation

[`Get-GuidePdfPlan` and `New-GuidePdf`](../../system/OpenGuidePlatform.PowerShell.Core/PdfPublishing/Get-GuidePdfPlan.ps1) select only a download declared `generated`, read `index.md` or `index.<language>.md`, and pass language to Pandoc as metadata. They check tools/fonts, render in staging and check the PDF header before publishing. Replacement requires the existing output's expected SHA256. Supplied and protected downloads cannot be selected for generation. [`Get-GuideAssessment`](../../system/OpenGuidePlatform.PowerShell.Core/Assessment/Get-GuideAssessment.ps1) flags `lang` in Hugo front matter as deprecated.
[`Get-GuidePdfPlan` and `New-GuidePdf`](../../system/OpenGuidePlatform.PowerShell.Core/PdfPublishing/Get-GuidePdfPlan.ps1) select only a download declared `generated`, read `index.md` or `index.<language>.md`, and pass language to Pandoc as metadata. The recipe is [resolved](../../system/OpenGuidePlatform.PowerShell.Core/PdfPublishing/Resolve-GuidePdfRecipe.ps1) from platform templates and the site's `pdf/` folder by guide, edition and language; cover credits come from [contributor data](../../system/OpenGuidePlatform.PowerShell.Core/ContributorManagement/Get-GuideCredits.ps1). Template parts are rendered with the generated metadata before the main Pandoc run. See [Guide PDFs and contributor records](guide-pdf-and-contributors.md). They check tools/fonts, render in staging and check the PDF header before publishing. Replacement requires the existing output's expected SHA256. Supplied and protected downloads cannot be selected for generation. [`Get-GuideAssessment`](../../system/OpenGuidePlatform.PowerShell.Core/Assessment/Get-GuideAssessment.ps1) flags `lang` in Hugo front matter as deprecated, blocks the retired `author`, `translators`, font and `dir` keys, and validates contributor data and PDF settings.

[`New-GuidePdf`](../../system/OpenGuidePlatform.PowerShell.Core/PdfPublishing/Get-GuidePdfPlan.ps1) returns a v1 receipt with guide, edition, language, input/output hashes, configuration hash, toolchain, environment digest and optional cache key. [`Save-GuidePdfReceipt` and `Get-GuidePdfReceipts`](../../system/OpenGuidePlatform.PowerShell.Core/PdfPublishing/Get-GuidePdfReceipts.ps1) save and validate declared receipts; Prepare calls the latter without rerunning Pandoc. [`Test-GuidePdfCache`](../../system/OpenGuidePlatform.PowerShell.Core/PdfPublishing/Test-GuidePdfCache.ps1) uses content/recipe/tool/environment evidence rather than timestamps. The returned PDF result says visual review is required; neither receipt validation nor source discovery assesses translation quality.

Expand Down
Loading
Loading