ruff
This commit is contained in:
1 parent
2aed176c9e
commit
0ff5c6b526
3 files changed
+16
-5
No files matched your search
+4
-2
@@ -679,8 +679,10 @@ async def editor_ws(ws: WebSocket) -> None:
|
||||
{"type": "error", "detail": str(e.detail)}
|
||||
)
|
||||
continue
|
||||
if image and image != "@favicon" and not re.fullmatch(
|
||||
r"[0-9a-f]{12}", image
|
||||
if (
|
||||
image
|
||||
and image != "@favicon"
|
||||
and not re.fullmatch(r"[0-9a-f]{12}", image)
|
||||
):
|
||||
await ws.send_json(
|
||||
{
|
||||
|
||||
+3
-1
@@ -102,7 +102,9 @@ def select_language(
|
||||
return original
|
||||
|
||||
|
||||
def hybrid_items(data: Data, node: Node, path: str, lang: str) -> list[tuple[bytes | None, str]]:
|
||||
def hybrid_items(
|
||||
data: Data, node: Node, path: str, lang: str
|
||||
) -> list[tuple[bytes | None, str]]:
|
||||
"""The served hybrid as (anchor, block text) pairs: the anchor is the
|
||||
ORIGINAL chunk hash behind the block (None for translation-only
|
||||
addition blocks), in article order.
|
||||
|
||||
+9
-2
@@ -381,8 +381,15 @@ def _layout(
|
||||
doc.link(rel="alternate", hreflang=hreflang, href=href)
|
||||
# Feed/LLM discovery links (see pagerite/feeds.py): identical on every
|
||||
# page, so the positional <head> sync (swapdoc.js) is unaffected.
|
||||
doc.link(rel="alternate", type="application/feed+json", title="JSON Feed", href="/feed.json")
|
||||
doc.link(rel="alternate", type="application/rss+xml", title="RSS feed", href="/feed.xml")
|
||||
doc.link(
|
||||
rel="alternate",
|
||||
type="application/feed+json",
|
||||
title="JSON Feed",
|
||||
href="/feed.json",
|
||||
)
|
||||
doc.link(
|
||||
rel="alternate", type="application/rss+xml", title="RSS feed", href="/feed.xml"
|
||||
)
|
||||
doc.link(rel="llms-txt", type="text/markdown", title="llms.txt", href="/llms.txt")
|
||||
for key, value in (social or {}).items():
|
||||
if value:
|
||||
|
||||
Reference in new issue
Block a user