openvibers/openvibe.today Commits

Today: the sign-in link carries the path only (#4)

OP OpenVibers committed 16 days ago · d3f7e7bd82 · 1 file, +3 −1

o.path is the whole requested URL, so a page opened with ?utm=… or a search query put those words
into the shared navbar's sign-in link on every page. The link now takes the path part, as the
canonical already did.

Changes

ddiff --git a/server/render/layout.js b/server/render/layout.js
iindex 96ef30b..5558afd 100644
---- a/server/render/layout.js
++++ b/server/render/layout.js
@@@ -45,7 +45,9 @@ function renderPage(o) {
const viewer = o.viewer || { kind: 'anonymous' };
const signedIn = viewer.kind === 'user';
const pathNow = o.path || '/';
-- const loginNext = encodeURIComponent(pathNow);
++ // The path without its query: o.path is often the whole requested URL, and a sign-in link that echoed
++ // the query would put the page's words into every page of the site (SEO-7 review, 2026-10-29).
++ const loginNext = encodeURIComponent(pathNow.split('?')[0] || '/');
const canonical = `${o.config.baseUrl}${pathNow.split('?')[0]}`;
const nav = {
service: 'today',