Merge pull request #4770 from toeverything/fix-html-template

fix(core): description field in html template
This commit is contained in:
LongYinan
2023-10-30 16:37:45 +00:00
committed by GitHub
3 changed files with 8 additions and 11 deletions

View File

@@ -9,7 +9,7 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
flavor: flavor:
description: 'Build type (canary, beta, internal or stable)' description: 'Build type (canary, beta, or stable)'
type: string type: string
default: canary default: canary
@@ -40,7 +40,6 @@ jobs:
build-core: build-core:
name: Build @affine/core name: Build @affine/core
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: production
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -68,7 +67,6 @@ jobs:
build-storage: build-storage:
name: Build Storage name: Build Storage
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: ${{ github.event.inputs.flavor }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -90,7 +88,6 @@ jobs:
build-storage-arm64: build-storage-arm64:
name: Build Storage arm64 name: Build Storage arm64
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: ${{ github.event.inputs.flavor }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -112,7 +109,6 @@ jobs:
build-docker: build-docker:
name: Build Docker name: Build Docker
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: ${{ github.event.inputs.flavor }}
needs: needs:
- build-server - build-server
- build-core - build-core

View File

@@ -12,14 +12,14 @@
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" /> <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" sizes="192x192" href="/chrome-192x192.png" /> <link rel="icon" sizes="192x192" href="/chrome-192x192.png" />
<meta name="emotion-insertion-point" content="" /> <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:card" content="summary_large_image" />
<meta name="twitter:url" content="https://app.affine.pro/" /> <meta name="twitter:url" content="https://app.affine.pro/" />
<meta <meta
name="twitter:title" name="twitter:title"
content="AFFiNE: There can be more than Notion and Miro." 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:site" content="@AffineOfficial" />
<meta name="twitter:image" content="https://affine.pro/og.jpeg" /> <meta name="twitter:image" content="https://affine.pro/og.jpeg" />
<meta <meta
@@ -27,10 +27,7 @@
content="AFFiNE: There can be more than Notion and Miro." content="AFFiNE: There can be more than Notion and Miro."
/> />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta <meta property="og:description" content="<%= DESCRIPTION %>" />
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:url" content="https://app.affine.pro/" /> <meta property="og:url" content="https://app.affine.pro/" />
<meta property="og:image" content="https://affine.pro/og.jpeg" /> <meta property="og:image" content="https://affine.pro/og.jpeg" />
<link <link

View File

@@ -7,6 +7,8 @@ import HTMLPlugin from 'html-webpack-plugin';
import { gitShortHash } from './s3-plugin.js'; 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) { export default async function (cli_env: any, _: any) {
const flags: BuildFlags = JSON.parse( const flags: BuildFlags = JSON.parse(
Buffer.from(cli_env.flags, 'hex').toString('utf-8') Buffer.from(cli_env.flags, 'hex').toString('utf-8')
@@ -48,6 +50,7 @@ export default async function (cli_env: any, _: any) {
filename: 'index.html', filename: 'index.html',
templateParameters: { templateParameters: {
GIT_SHORT_SHA: gitShortHash(), GIT_SHORT_SHA: gitShortHash(),
DESCRIPTION,
}, },
}), }),
new HTMLPlugin({ new HTMLPlugin({
@@ -65,6 +68,7 @@ export default async function (cli_env: any, _: any) {
filename: '_plugin/index.html', filename: '_plugin/index.html',
templateParameters: { templateParameters: {
GIT_SHORT_SHA: gitShortHash(), GIT_SHORT_SHA: gitShortHash(),
DESCRIPTION,
}, },
}), }),
], ],