feat: structured data in markdown/LLM output + v0.3.6

__NEXT_DATA__, SvelteKit, and JSON-LD now appear as a
## Structured Data section in -f markdown and -f llm output.
Works with --only-main-content and all extraction flags.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Valerio 2026-04-02 19:16:56 +02:00
parent b219fc3648
commit 344eea74d9
5 changed files with 37 additions and 7 deletions

View file

@ -45,6 +45,13 @@ pub fn to_llm_text(result: &ExtractionResult, url: Option<&str>) -> String {
}
}
// -- 4. Structured data (NEXT_DATA, SvelteKit, JSON-LD) --
if !result.structured_data.is_empty() {
out.push_str("\n\n## Structured Data\n\n```json\n");
out.push_str(&serde_json::to_string_pretty(&result.structured_data).unwrap_or_default());
out.push_str("\n```");
}
out.trim().to_string()
}