feat(web): merge DigitalOcean release announcement updates (#860)

* feat(web): announce DigitalOcean acquisition across sites

* fix(web): make blog routes resilient without Sanity config

* fix(web): add mobile arrow cue to announcement banner

* fix(web): point acquisition links to announcement post
This commit is contained in:
Musa 2026-04-02 09:03:52 -04:00 committed by GitHub
parent 0857cfafbf
commit 39b430d74b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 3156 additions and 701 deletions

View file

@ -6,15 +6,22 @@ const projectId = process.env.NEXT_PUBLIC_SANITY_PROJECT_ID;
const dataset = process.env.NEXT_PUBLIC_SANITY_DATASET;
const apiVersion = process.env.NEXT_PUBLIC_SANITY_API_VERSION;
export const client = createClient({
projectId,
dataset,
apiVersion,
useCdn: true, // Set to false if statically generating pages, using ISR or using the on-demand revalidation API
});
export const hasSanityConfig = Boolean(projectId && dataset && apiVersion);
const builder = imageUrlBuilder(client);
export const client = hasSanityConfig
? createClient({
projectId,
dataset,
apiVersion,
useCdn: true, // Set to false if statically generating pages, using ISR or using the on-demand revalidation API
})
: null;
const builder = client ? imageUrlBuilder(client) : null;
export function urlFor(source: SanityImageSource) {
if (!builder) {
throw new Error("Sanity client is not configured.");
}
return builder.image(source);
}