Add a file library in Google Drive for pages to link to
Tools → Media → Files uploads PDF, Office (.docx, .xlsx, .pptx), MP3, M4A and zip files, up to 50 MB, to the shared drive's Blog folder and shares each as anyone with the link can view (migration 048). A file's name and contents must agree. Content block links get "Choose a file" (paragraph, button and image links, list and link items, link cards). A link card also takes the file's name and Drive's picture of its first page, fetched after upload and saved into the image library; cards to Drive say "Google Drive". Deleting a file says first what still links to it. Setup and the nginx block: docs/google-drive-and-mail.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
36c9226bd9
commit
934598f954
13 changed files with 772 additions and 33 deletions
|
|
@ -79,7 +79,9 @@ function LinkCard({ item }: { item: ContentBlockItem }) {
|
|||
const where = isExternalUrl(url)
|
||||
? (() => {
|
||||
try {
|
||||
return new URL(url).hostname.replace(/^www\./, '')
|
||||
const host = new URL(url).hostname.replace(/^www\./, '')
|
||||
// A file from Tools → Media → Files (routes/files.js).
|
||||
return /^(drive|docs)\.google\.com$/.test(host) ? 'Google Drive' : host
|
||||
} catch {
|
||||
return url
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue