Skip to content

SEO: consolidate BaaS hub, redirects, comparison content#2920

Open
eldadfux wants to merge 1 commit intomainfrom
seo/backend-as-a-service-hub
Open

SEO: consolidate BaaS hub, redirects, comparison content#2920
eldadfux wants to merge 1 commit intomainfrom
seo/backend-as-a-service-hub

Conversation

@eldadfux
Copy link
Copy Markdown
Member

Rename blog slug to /blog/post/backend-as-a-service, rewrite article for comparison intent, add metaTitle and FAQ schema in Post layout, 308 redirects from overlapping URLs, remove duplicate posts, add best-platforms satellite post, and internal links from docs and related blog posts.

Made-with: Cursor

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Rename blog slug to /blog/post/backend-as-a-service, rewrite article for
comparison intent, add metaTitle and FAQ schema in Post layout, 308 redirects
from overlapping URLs, remove duplicate posts, add best-platforms satellite
post, and internal links from docs and related blog posts.

Made-with: Cursor
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 28, 2026

Greptile Summary

This PR consolidates overlapping BaaS content into a single hub post (/blog/post/backend-as-a-service), deletes three duplicate posts with 308 redirects, adds a satellite "best platforms" post, and seeds internal links across eight existing blog posts and the docs landing page.

  • P1 – TypeScript error in Post.svelte: createFaqSchema(faqs) is called inside {#if faqs?.length} but optional-chain guards don't narrow faqs from T[] | undefined to T[], so passing it to createFaqSchema (which expects a non-optional array) will fail svelte-check. Fix: use faqs!.

Confidence Score: 4/5

Safe to merge after fixing the TypeScript type error in Post.svelte; all redirects, content changes, and new posts are structurally sound.

One P1 TypeScript error (passing a possibly-undefined value to a function expecting a non-optional array) will fail strict type-checking. All other changes are editorial, redirect configuration, or additive content with no logic defects.

src/markdoc/layouts/Post.svelte — the createFaqSchema(faqs) call at line 156 needs a non-null assertion.

Important Files Changed

Filename Overview
src/markdoc/layouts/Post.svelte Adds metaTitle and faqs props; injects FAQ JSON-LD schema — but passes faqs (typed as `T[]
src/redirects.json Adds four 308 redirects covering all three deleted post slugs plus a ghost URL (choosing-the-right-backend); correctly handled by the existing hooks.server.ts redirecter.
src/routes/blog/post/backend-as-a-service/+page.markdoc New consolidated BaaS hub post with comparison tables, metaTitle, and structured FAQ frontmatter; FAQ content is intentionally duplicated as both JSON-LD schema and visible prose.
src/routes/blog/post/best-backend-as-a-service-platforms/+page.markdoc New satellite post acting as a curated index; reuses the baas-backend-as-a-service cover image (still on disk) and links back to the hub post.
src/routes/docs/+page.svelte Adds an inline link to the BaaS hub post in the docs landing description; change is purely editorial.

Reviews (1): Last reviewed commit: "SEO: consolidate BaaS hub, redirects, co..." | Re-trigger Greptile

Comment on lines +154 to +157
{#if faqs?.length}
<!-- eslint-disable-next-line svelte/no-at-html-tags-->
{@html getInlinedScriptTag(createFaqSchema(faqs))}
{/if}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 TypeScript type error: faqs not narrowed inside {#if faqs?.length}

faqs is declared as { question: string; answer: string }[] | undefined, but TypeScript's optional-chain guard (faqs?.length) does not narrow the type of faqs itself inside the block — it stays T[] | undefined. Passing it to createFaqSchema, which expects a non-optional Array<…>, is a type error that will fail svelte-check. Use a non-null assertion or refactor the guard to a simple {#if faqs} check (which does narrow in Svelte templates).

Suggested change
{#if faqs?.length}
<!-- eslint-disable-next-line svelte/no-at-html-tags-->
{@html getInlinedScriptTag(createFaqSchema(faqs))}
{/if}
{#if faqs?.length}
<!-- eslint-disable-next-line svelte/no-at-html-tags-->
{@html getInlinedScriptTag(createFaqSchema(faqs!))}
{/if}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant