Serve /apps/:slug instead of /apps/:id - #99
Merged
Merged
Conversation
Signed-off-by: v0l <kieran@harkin.me>
Signed-off-by: v0l <kieran@harkin.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #94.
No backend change needed —
ApiApp.name(lnvps_api/src/api/apps.rs:65) is already documented as the URL/DNS-safe slug; the frontend just never used it as the route param.src/routes.tsx—/apps/:id→/apps/:slug.src/loaders.tsappLoader— no by-slug endpoint, so it reads the same public catalogappsLoader/homeLoaderalready fetch and cache (listApps()), and finds the row byname. One less endpoint hit than before, not one more.src/pages/app.tsx— the client-side refresh effect needed the numeric id forgetApp/deployment filtering; now reads it off the loader's already-resolvedapp.idinstead of re-parsing the URL param. Canonical URL uses the slug.src/utils/app-seo.tsappJsonLd,src/pages/account-apps.tsxAppCard,src/pages/blossom-server-hosting.tsx's CTA — all three build the app URL offapp.namenow instead ofapp.id/BlossomAppId.server/gen-sitemap.ts— easy to miss since it's outsidesrc/: fetches the raw catalog itself for the sitemap, was pulling.id.bun run build's generatedsitemap.xmlconfirmed slug-based, not stale.Verified server-rendered, not just the build:
curlon/apps/strfryand/apps/route96— real<title>,<h1>, canonical<link>and JSON-LDurl, all slug-based./appslisting's card links and the Blossom CTA both point at the new URLs.One thing to flag, not decided here: old numeric URLs (
/apps/2) now resolve to the same empty/noindex state as any unknown id — no redirect to the slug. If any of these are already indexed or linked externally, that's lost link equity until re-crawled. Didn't add a redirect since the issue didn't ask for one and I don't know if these URLs have any real backlinks yet.bun test45 pass (incl. a newappJsonLdtest and updatedgen-sitemapfixtures),tsc --noEmitclean, build clean at d830c60.