mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
feat(link): add Open Graph fields for enhanced link sharing
- Introduced ogTitle, ogDescription, and ogImageUrl fields in the Link model for improved social media previews. - Updated the database schema to accommodate new Open Graph fields. - Modified link creation and editing forms to include inputs for Open Graph metadata. - Enhanced the GET route to serve Open Graph metadata for bots. This update allows for better customization of shared links, improving their presentation on social media platforms.
This commit is contained in:
parent
b915f15ed9
commit
e295fca187
6 changed files with 65 additions and 38 deletions
|
|
@ -0,0 +1,5 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "link"
|
||||
ADD COLUMN "og_description" VARCHAR(500),
|
||||
ADD COLUMN "og_image_url" VARCHAR(500),
|
||||
ADD COLUMN "og_title" VARCHAR(500);
|
||||
|
|
@ -277,18 +277,18 @@ model Revenue {
|
|||
}
|
||||
|
||||
model Link {
|
||||
id String @id() @unique() @map("link_id") @db.Uuid
|
||||
name String @db.VarChar(100)
|
||||
url String @db.VarChar(500)
|
||||
slug String @unique() @db.VarChar(100)
|
||||
title String? @db.VarChar(500)
|
||||
description String? @db.VarChar(500)
|
||||
image String? @db.VarChar(500)
|
||||
userId String? @map("user_id") @db.Uuid
|
||||
teamId String? @map("team_id") @db.Uuid
|
||||
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamptz(6)
|
||||
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamptz(6)
|
||||
deletedAt DateTime? @map("deleted_at") @db.Timestamptz(6)
|
||||
id String @id() @unique() @map("link_id") @db.Uuid
|
||||
name String @db.VarChar(100)
|
||||
url String @db.VarChar(500)
|
||||
slug String @unique() @db.VarChar(100)
|
||||
ogTitle String? @map("og_title") @db.VarChar(500)
|
||||
ogDescription String? @map("og_description") @db.VarChar(500)
|
||||
ogImageUrl String? @map("og_image_url") @db.VarChar(500)
|
||||
userId String? @map("user_id") @db.Uuid
|
||||
teamId String? @map("team_id") @db.Uuid
|
||||
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamptz(6)
|
||||
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamptz(6)
|
||||
deletedAt DateTime? @map("deleted_at") @db.Timestamptz(6)
|
||||
|
||||
user User? @relation("user", fields: [userId], references: [id])
|
||||
team Team? @relation(fields: [teamId], references: [id])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue