Skip to content
Merged
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
10 changes: 9 additions & 1 deletion plugins/astro-agent-docs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,15 @@ function cleanMarkdown(raw, isMdx = false) {
}
body = body.replace(/\n{3,}/g, "\n\n").trim();
const title = data.title ? `# ${data.title}\n\n` : "";
return BOM + title + LLMS_TXT_DIRECTIVE + body + "\n";
// Include hero text for splash pages — rendered in HTML but not in the content body.
let heroText = "";
if (data.hero?.title) {
heroText += data.hero.title.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim() + "\n\n";
}
if (data.hero?.tagline) {
heroText += data.hero.tagline + "\n\n";
}
return BOM + title + heroText + LLMS_TXT_DIRECTIVE + body + "\n";
}

/**
Expand Down
Loading