mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-28 06:37:24 -05:00
feat: tune search weights and heavy page loads
Status badges and hash-listing blocks leave the search index, card titles weigh as page titles, and Pagefind ranking is set inside a range where the ten gate queries all answer (search_gate.py: 10/10). Tables are set up and measured when they near the screen, which relaid out a 3,800-row page after its first paint, and console icons hold their box.
This commit is contained in:
1 parent
294942afd0
commit
5f3534bdf2
9 files changed
+179
-26
No files matched your search
@@ -153,6 +153,15 @@ def image(alt: str, src: str, **attributes: str) -> str:
|
||||
return f'<img src="{html.escape(src)}" alt="{html.escape(alt)}"{attrs}>'
|
||||
|
||||
|
||||
def hash_value(value: object) -> str:
|
||||
"""A hash printed whole, in the hash style. One element under Starlight:
|
||||
a span around a code span was 1,400 extra elements on a page of cards."""
|
||||
text = str(value).replace("`", "'")
|
||||
if _engine == "mkdocs":
|
||||
return f'<span class="rb-hash">`{text}`</span>'
|
||||
return f'<code class="rb-hash">{html.escape(text, quote=False)}</code>'
|
||||
|
||||
|
||||
def block_open(tag: str, attributes: str = "") -> str:
|
||||
"""The opening tag of an HTML block whose content is Markdown."""
|
||||
attributes = f" {attributes.strip()}" if attributes.strip() else ""
|
||||
|
||||
Reference in new issue
Block a user