mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-24 04:39:06 -05:00
generate_site.py --engine starlight writes the pages, navigation and data files of an Astro Starlight project in website/. Links resolve to site addresses, every heading keeps its MkDocs id, and pages split by size are measured in the MkDocs Markdown so both builds cut the same files. The 839 pages and their 45,613 ids match the MkDocs build.
22 lines
503 B
Plaintext
22 lines
503 B
Plaintext
---
|
|
// Search ranking: Pagefind multiplies the score of words inside a weighted
|
|
// element, so a Start here page outranks the reference page that names it.
|
|
import Default from '@astrojs/starlight/components/MarkdownContent.astro';
|
|
|
|
const { boost } = Astro.locals.starlightRoute.entry.data;
|
|
---
|
|
|
|
{
|
|
boost ? (
|
|
<div data-pagefind-weight={String(Math.min(10, boost * 2))}>
|
|
<Default><slot /></Default>
|
|
</div>
|
|
) : (
|
|
<Default><slot /></Default>
|
|
)
|
|
}
|
|
|
|
<script>
|
|
import '../scripts/site.ts';
|
|
</script>
|