Use article link markers for PDF indexing

This commit is contained in:
Nobody committed 2026-11-17 16:26:01 +08:00
1 parent 09af3bd8c0
commit 33f15d9ce0
20 files changed
+1137 -293

No files matched your search

+8 -2
View File
@@ -1,4 +1,7 @@
import { type GPConfig, processPdfConfig } from "./pipeline.ts";
import { type GPConfig } from "./pipeline.ts";
import { PublicationInput } from "../document/inputs.ts";
import { PdfOutput } from "../document/outputs.ts";
import { convertDocument } from "../document/types.ts";
import type { TemplateVariables } from "../template/engine.ts";
type WorkerRequest = {
@@ -26,7 +29,10 @@ const workerGlobal = self as unknown as {
workerGlobal.onmessage = async (event: MessageEvent<WorkerRequest>) => {
const { id, config, options } = event.data;
try {
await processPdfConfig(config, options);
await convertDocument(
new PublicationInput(config, options.variables),
new PdfOutput(config, options),
);
workerGlobal.postMessage({ id, ok: true } satisfies WorkerResponse);
} catch (error) {
workerGlobal.postMessage(