Add a Request form, with files in Google Drive and email notices

One form at /request for blog posts, events, and new or updated
chapters, regions (updates only), partners, teams, awards and people.
?type= opens it on one; buttons on the Community sections, blog posts,
Retreats and the front page calendar do. Files (.docx, PDF, JPEG, PNG)
go to a Google Drive folder through a service account.

Requests are feedback rows of type 'content' (migration 046), in a
third Forms queue: files download from Drive, a .docx can become a
draft blog post, and deleting a request deletes its files. New content
and data requests email the addresses in Site settings through Gmail.

Setup: docs/google-drive-and-mail.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-29 15:54:00 -05:00
parent 0e582c236b
commit dc53af238f
31 changed files with 1318 additions and 113 deletions

View file

@ -24,7 +24,7 @@ import siteConfiguration from '../../site.json'
type PageText = { title: string; description: string }
type SiteText = { title?: string; pages?: Record<string, PageText>; privacyEmail?: string }
type SiteText = { title?: string; pages?: Record<string, PageText>; privacyEmail?: string; requestFiles?: boolean }
/* What the server wrote into the page, if it did. */
const fromServer: SiteText =
@ -38,6 +38,11 @@ export const SITE_ORIGIN: string = siteConfiguration.url
* settings, else site.json). Blank: the Privacy page's form only. */
export const PRIVACY_EMAIL: string = fromServer.privacyEmail ?? siteConfiguration.privacyEmail
/** Whether the Request form takes files (Google Drive is set up on
* the server). Unknown (the Vite dev server) offers them, and the
* server says so if it can't. */
export const REQUEST_FILES: boolean = fromServer.requestFiles ?? true
/** A site path as a full URL on the live site. */
export const siteUrl = (path: string): string => new URL(path, SITE_ORIGIN).href