Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): description field in html template

LongYinanfc27a2e90604
diff --git a/packages/frontend/core/.webpack/template.html b/packages/frontend/core/.webpack/template.html
index 64496348af..4c0ee95014 100644
--- a/packages/frontend/core/.webpack/template.html
+++ b/packages/frontend/core/.webpack/template.html
@@ -12,14 +12,14 @@
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" sizes="192x192" href="/chrome-192x192.png" />
<meta name="emotion-insertion-point" content="" />
- <meta property="description" content="{description}" />
+ <meta property="description" content="<%= DESCRIPTION %>" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:url" content="https://app.affine.pro/" />
<meta
name="twitter:title"
content="AFFiNE: There can be more than Notion and Miro."
/>
- <meta name="twitter:description" content="{description}" />
+ <meta name="twitter:description" content="<%= DESCRIPTION %>" />
<meta name="twitter:site" content="@AffineOfficial" />
<meta name="twitter:image" content="https://affine.pro/og.jpeg" />
<meta
@@ -27,10 +27,7 @@
content="AFFiNE: There can be more than Notion and Miro."
/>
<meta property="og:type" content="website" />
- <meta
- property="og:description"
- content="There can be more than Notion and Miro. AFFiNE is a next-gen knowledge base that brings planning, sorting and creating all together."
- />
+ <meta property="og:description" content="<%= DESCRIPTION %>" />
<meta property="og:url" content="https://app.affine.pro/" />
<meta property="og:image" content="https://affine.pro/og.jpeg" />
<link
diff --git a/packages/frontend/core/.webpack/webpack.config.ts b/packages/frontend/core/.webpack/webpack.config.ts
index 0fe4ebcead..dfbcf38f61 100644
--- a/packages/frontend/core/.webpack/webpack.config.ts
+++ b/packages/frontend/core/.webpack/webpack.config.ts
@@ -7,6 +7,8 @@ import HTMLPlugin from 'html-webpack-plugin';
import { gitShortHash } from './s3-plugin.js';
+const DESCRIPTION = `There can be more than Notion and Miro. AFFiNE is a next-gen knowledge base that brings planning, sorting and creating all together.`;
+
export default async function (cli_env: any, _: any) {
const flags: BuildFlags = JSON.parse(
Buffer.from(cli_env.flags, 'hex').toString('utf-8')
@@ -48,6 +50,7 @@ export default async function (cli_env: any, _: any) {
filename: 'index.html',
templateParameters: {
GIT_SHORT_SHA: gitShortHash(),
+ DESCRIPTION,
},
}),
new HTMLPlugin({
@@ -65,6 +68,7 @@ export default async function (cli_env: any, _: any) {
filename: '_plugin/index.html',
templateParameters: {
GIT_SHORT_SHA: gitShortHash(),
+ DESCRIPTION,
},
}),
],