diff --git a/frontend/appflowy_web_app/nginx.conf b/frontend/appflowy_web_app/nginx.conf index c955b7519e..9a1db35d27 100644 --- a/frontend/appflowy_web_app/nginx.conf +++ b/frontend/appflowy_web_app/nginx.conf @@ -66,6 +66,12 @@ http { access_log off; } + location /og-image.png { + root /usr/share/nginx/html; + expires 30d; + access_log off; + } + error_page 404 /404.html; location = /404.html { root /usr/share/nginx/html; diff --git a/frontend/appflowy_web_app/public/og-image.png b/frontend/appflowy_web_app/public/og-image.png new file mode 100644 index 0000000000..8b5996608a Binary files /dev/null and b/frontend/appflowy_web_app/public/og-image.png differ diff --git a/frontend/appflowy_web_app/server.cjs b/frontend/appflowy_web_app/server.cjs index 876144f921..5c0f8449ed 100644 --- a/frontend/appflowy_web_app/server.cjs +++ b/frontend/appflowy_web_app/server.cjs @@ -60,7 +60,7 @@ const BASE_URL = process.env.AF_BASE_URL || 'https://beta.appflowy.cloud'; const createServer = async (req) => { const timer = logRequestTimer(req); const reqUrl = new URL(req.url); - + logger.info(`Request URL: ${reqUrl.pathname}`); const [ @@ -68,7 +68,7 @@ const createServer = async (req) => { publishName, ] = reqUrl.pathname.slice(1).split('/'); - logger.info(`Namespace: ${namespace}, Publish Name: ${publishName}`); + logger.info(`Namespace: ${namespace}, Puganblish Name: ${publishName}`); if (namespace === '' || !publishName) { timer(); @@ -94,7 +94,7 @@ const createServer = async (req) => { const description = 'Write, share, and publish docs quickly on AppFlowy.\nGet started for free.'; let title = 'AppFlowy'; const url = 'https://appflowy.io'; - let image = 'https://d3uafhn8yrvdfn.cloudfront.net/website/production/_next/static/media/og-image.e347bfb5.png'; + let image = '/og-image.png'; try { // Inject meta data into the HTML to support SEO and social sharing diff --git a/frontend/appflowy_web_app/src/application/collab.type.ts b/frontend/appflowy_web_app/src/application/collab.type.ts index abef418897..1b05f85abe 100644 --- a/frontend/appflowy_web_app/src/application/collab.type.ts +++ b/frontend/appflowy_web_app/src/application/collab.type.ts @@ -47,7 +47,7 @@ export enum AlignType { } export interface BlockData { - bg_color?: string; + bgColor?: string; font_color?: string; align?: AlignType; } diff --git a/frontend/appflowy_web_app/src/components/editor/components/blocks/heading/Heading.tsx b/frontend/appflowy_web_app/src/components/editor/components/blocks/heading/Heading.tsx index 8d4351a2d0..52ca277fcf 100644 --- a/frontend/appflowy_web_app/src/components/editor/components/blocks/heading/Heading.tsx +++ b/frontend/appflowy_web_app/src/components/editor/components/blocks/heading/Heading.tsx @@ -1,3 +1,4 @@ +import { HEADER_HEIGHT } from '@/components/publish/header'; import { getHeadingCssProperty } from './utils'; import { EditorElementProps, HeadingNode } from '@/components/editor/editor.type'; import React, { forwardRef, memo } from 'react'; @@ -10,7 +11,15 @@ export const Heading = memo( const className = `${attributes.className ?? ''} ${fontSizeCssProperty} level-${level}`; return ( -