Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/markdoc/layouts/Post.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import { formatDate } from '$lib/utils/date';
import {
createBreadcrumbsSchema,
createFaqSchema,
createPostSchema,
DEFAULT_HOST,
getInlinedScriptTag
Expand All @@ -27,6 +28,8 @@
import type { LayoutContext } from './Article.svelte';

export let title: string;
/** When set, used for `<title>` / Open Graph title while `title` stays the on-page H1. */
export let metaTitle: string | undefined = undefined;
export let description: string;
export let author: string | string[];
export let date: string;
Expand All @@ -35,6 +38,7 @@
export let category: string;
export let callToAction: BlogCallToActionInput;
export let lastUpdated: string;
export let faqs: { question: string; answer: string }[] | undefined = undefined;

const posts = getContext<PostsData[]>('posts')?.filter(
(post) => !(post.unlisted ?? false) && !(post.draft ?? false)
Expand Down Expand Up @@ -100,13 +104,14 @@
}

const currentURL = `https://appwrite.io${page.url.pathname}`;
const resolvedMetaTitle = metaTitle ?? title;
</script>

<svelte:head>
<!-- Titles -->
<title>{title + TITLE_SUFFIX}</title>
<meta property="og:title" content={title} />
<meta name="twitter:title" content={title} />
<title>{resolvedMetaTitle + TITLE_SUFFIX}</title>
<meta property="og:title" content={resolvedMetaTitle} />
<meta name="twitter:title" content={resolvedMetaTitle} />
<!-- Description -->
<meta name="description" content={description} />
<meta property="og:description" content={description} />
Expand Down Expand Up @@ -145,6 +150,11 @@
: undefined
)
)}

{#if faqs?.length}
<!-- eslint-disable-next-line svelte/no-at-html-tags-->
{@html getInlinedScriptTag(createFaqSchema(faqs))}
{/if}
Comment on lines +154 to +157
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}

</svelte:head>

<Main>
Expand Down
16 changes: 16 additions & 0 deletions src/redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -843,5 +843,21 @@
{
"link": "/install/env",
"redirect": "/docs/advanced/self-hosting/installation#manual-installation"
},
{
"link": "/blog/post/backend-as-a-service-baas",
"redirect": "/blog/post/backend-as-a-service"
},
{
"link": "/blog/post/baas-backend-as-a-service-explained-when-should-you-use-it",
"redirect": "/blog/post/backend-as-a-service"
},
{
"link": "/blog/post/choosing-the-right-baas-in-2025",
"redirect": "/blog/post/backend-as-a-service"
},
{
"link": "/blog/post/choosing-the-right-backend",
"redirect": "/blog/post/backend-as-a-service"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ If you are looking to build a mobile app, website, tool, or any other applicatio

This article will give you a rundown of Appwrite and Supabase to understand the feature sets. Then, we’ll provide a quick Appwrite vs Supabase comparison so you can understand how each provider will fit your specific needs.

For a wider **backend infrastructure** comparison that also includes Firebase and AWS Amplify, read [Backend as a service (BaaS)](/blog/post/backend-as-a-service).

# Appwrite

In 2019, [Appwrite](/) started as an open-source project to make software development more accessible and enjoyable. It is a Backend as a Service platform with a vibrant developer community. You can self-host Appwrite on your server or utilize [Appwrite Cloud](https://cloud.appwrite.io/). Appwrite provides a wide range of features, including user authentication, databases, storage, real-time features, and functions. It is known for its flexibility, security, and extensibility, enabling you to implement custom backend logic and build applications tailored to your needs. You can view Appwrite’s source code on [GitHub](https://github.com/appwrite/appwrite).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Serverless functions are a powerful tool for developers designed to provide flex

In this comparison, we'll take a look at the serverless functions offered by three popular backend-as-a-service platforms: Firebase, Supabase, and Appwrite.

For open source, self-hosting, and lock-in across the same vendors (plus AWS Amplify), see the [BaaS platform comparison](/blog/post/backend-as-a-service).

# Firebase: the veteran

![Firebase-functions](/images/blog/comparing-functions/1.png)
Expand Down

This file was deleted.

2 changes: 2 additions & 0 deletions src/routes/blog/post/baas-vs-custom-backend/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ As a freelance developer, you juggle multiple roles – project manager, designe

This is where Backend-as-a-Service (BaaS) comes in. BaaS abstracts away backend complexity, allowing you to deliver an elevated product without getting bogged down in the repetitiveness of server-side development. And often, a BaaS can be a game-changer for freelance developers.

If you are still shortlisting **BaaS platforms**, start with the vendor comparison in [Backend as a service (BaaS)](/blog/post/backend-as-a-service).

# What is a BaaS?

Backend-as-a-Service (BaaS) is a third-party service that lets developers delegate common backend operations of a web or mobile application. Such operations include but are not limited to:
Expand Down
Loading
Loading