mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-01 09:24:46 +00:00
fix: broken links on logicsrc.com and the WebAuthn bundle 500 on app.logicsrc.com (#242)
* fix(web): broken doc links and missing OpenI18n/OpenL10n landings ThreatCrush Link Watch found 14 dead links on logicsrc.com: - /docs/opencreds linked its sub-documents and sibling specs as relative Markdown files (./opencreds/spec.md, ./credential-sharing.md), which resolved to /docs/*.md URLs the site never serves. Rendered docs now map a link to a served doc to /docs/<slug> and anything else to the file in the public repository; redirects keep the already-crawled .md URLs working. - OpenI18n and OpenL10n were registered with a /<slug> landing that has no page, so the sidebar and family grids linked /openi18n and /openl10n. They now have no landing (link to their docs), and the old paths redirect. A contract test checks that no rendered doc keeps a relative .md link, that every repository target exists, and that every spec landing has a page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(pwa): serve the WebAuthn bundle from the hoisted install /vendor/simplewebauthn-browser.umd.js joined apps/pwa/node_modules onto the path, but the workspace install hoists @simplewebauthn/browser to the repo root, so every sign-in and settings page loaded a 500 (ENOENT) and passkeys could not work. Resolve the package like the libsodium vendor routes do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e3111dec39
commit
159ae20be1
6 changed files with 107 additions and 9 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import type { NextConfig } from "next";
|
||||
import { docSlugs } from "./src/lib/specs";
|
||||
|
||||
// The CommandBoard API (boards, tasks, plugins, /health) runs as its own
|
||||
// service. In the old custom server.js it was mounted in-process; here we proxy
|
||||
|
|
@ -82,10 +83,22 @@ export function buildRewrites(
|
|||
* the home page; the spec it promised is OpenFleet, which has its own landing
|
||||
* page. Permanent, so the old URL in the sitemap and in links keeps working.
|
||||
*/
|
||||
const REPO_DOCS = "https://github.com/profullstack/logicsrc/blob/master/docs";
|
||||
|
||||
export function buildRedirects() {
|
||||
return [
|
||||
{ source: "/agent-swarm", destination: "/openfleet", permanent: true },
|
||||
{ source: "/openprofile/skills", destination: "/openskill", permanent: true }
|
||||
{ source: "/openprofile/skills", destination: "/openskill", permanent: true },
|
||||
// OpenI18n and OpenL10n have a specification text and no landing page.
|
||||
{ source: "/openi18n", destination: "/docs/openi18n", permanent: true },
|
||||
{ source: "/openl10n", destination: "/docs/openl10n", permanent: true },
|
||||
// The docs link each other as Markdown files (`./credential-sharing.md`,
|
||||
// `./opencreds/spec.md`), which resolved under /docs/ and 404ed. The pages
|
||||
// now rewrite those links; these keep the URLs already crawled working.
|
||||
// A doc the site serves goes to its page, anything else to the file in
|
||||
// the public repository.
|
||||
{ source: `/docs/:slug(${docSlugs().join("|")})\\.md`, destination: "/docs/:slug", permanent: true },
|
||||
{ source: "/docs/:path([a-z0-9][a-z0-9/-]*)\\.md", destination: `${REPO_DOCS}/:path.md`, permanent: true }
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue