mykiwi/mykiwi.blogpublic Fork
⑂ 4967c15
Commits
⬇ Clone ▾
git clone https://git.rickub.com/mykiwi/mykiwi.blog.git
git clone ssh://git@rickub.com/mykiwi/mykiwi.blog.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

Name the tab on the standby's feed page tooUnverified

The standby builds a <head> with a <title> in it, the same as the
stylesheet does, and the tab stayed empty anyway: the document is
still index.xml, an XML document, and a <title> element in one of
those names nothing. The browser fell back to showing the URL.

document.title is not markup and does work there, so say it outright
once the page is in place. The element stays - it is what the page
would be read as anywhere the markup is taken on its own - and this
is what the tab reads.

Only the standby needed it. Under the stylesheet the transform's
result is an HTML document, where the element means what it says.
Checked on both paths in Chrome and Firefox: the tab now reads
"mykiwi.blog · RSS feed" in all four.
Romain Gautier committed 2026-09-21T00:37:46+02:00 Browse files
4967c15 parent: fe98fed
modified blog/layouts/_default/home.feedscript.js +7 -1
@@ -100,7 +100,8 @@
100100 `body{background:${C.paper}}` +
101101 `@media (prefers-color-scheme: dark){body{background:${C.paperDark}}}`;
102102 head.appendChild(canvas);
103- head.appendChild(make("title", null, `${text(src, "channel > title") || C.site} · ${C.pageTitle}`));
103+ const docTitle = `${text(src, "channel > title") || C.site} · ${C.pageTitle}`;
104+ head.appendChild(make("title", null, docTitle));
104105 if (C.css) {
105106 const link = out.createElement("link");
106107 link.setAttribute("rel", "stylesheet");
@@ -274,6 +275,11 @@
274275 wrap.appendChild(foot);
275276
276277 src.replaceChild(src.importNode(out.documentElement, true), src.documentElement);
278+ // The <title> above is markup an XML document does not read: this is
279+ // still index.xml as far as the browser is concerned, and a <title>
280+ // element in it names nothing. Said outright, the tab reads the same as
281+ // it does under the stylesheet - without this it shows the URL.
282+ src.title = docTitle;
277283 globalThis.wireFeedCopy(src);
278284 };
279285
@@ -100,7 +100,8 @@
100 `body{background:${C.paper}}` +100 `body{background:${C.paper}}` +
101 `@media (prefers-color-scheme: dark){body{background:${C.paperDark}}}`;101 `@media (prefers-color-scheme: dark){body{background:${C.paperDark}}}`;
102 head.appendChild(canvas);102 head.appendChild(canvas);
103- head.appendChild(make("title", null, `${text(src, "channel > title") || C.site} · ${C.pageTitle}`));103+ const docTitle = `${text(src, "channel > title") || C.site} · ${C.pageTitle}`;
104+ head.appendChild(make("title", null, docTitle));
104 if (C.css) {105 if (C.css) {
105 const link = out.createElement("link");106 const link = out.createElement("link");
106 link.setAttribute("rel", "stylesheet");107 link.setAttribute("rel", "stylesheet");
@@ -274,6 +275,11 @@
274 wrap.appendChild(foot);275 wrap.appendChild(foot);
275 276
276 src.replaceChild(src.importNode(out.documentElement, true), src.documentElement);277 src.replaceChild(src.importNode(out.documentElement, true), src.documentElement);
278+ // The <title> above is markup an XML document does not read: this is
279+ // still index.xml as far as the browser is concerned, and a <title>
280+ // element in it names nothing. Said outright, the tab reads the same as
281+ // it does under the stylesheet - without this it shows the URL.
282+ src.title = docTitle;
277 globalThis.wireFeedCopy(src);283 globalThis.wireFeedCopy(src);
278 };284 };
279 285