Skip to content

Commit 3ebdbf4

Browse files
committed
feat: 部分字段改为config
1 parent 5be72a0 commit 3ebdbf4

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

config/color.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const accentColorLight = ['#33A6B8', '#FF6666', '#26A69A', '#fb7287', '#69a6cc'];
2+
3+
export const accentColorDark = ['#F596AA', '#A0A7D4', '#ff7b7b', '#99D8CF', '#838BC6'];

src/app/feed.xml/route.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import RSS from 'rss';
22
import { compiler } from 'markdown-to-jsx';
33

4-
import { siteUrl } from '~/seo';
4+
import { siteUrl, seo } from '~/seo';
55
import { buildPostData } from '@/core';
66

77
const { postDataList } = buildPostData();
@@ -10,7 +10,7 @@ export async function GET() {
1010
const ReactDOM = (await import('react-dom/server')).default;
1111

1212
const feed = new RSS({
13-
title: 'zhw blog',
13+
title: seo.title,
1414
description: '记录我的生活',
1515
site_url: siteUrl.toString(),
1616
feed_url: `${siteUrl}/feed.xml`,

src/app/layout.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export const metadata: Metadata = {
2626
keywords: seo.keywords,
2727
verification: { google: seo.googleVerification },
2828
icons: [{ rel: 'icon', url: '/favicon.ico' }],
29-
// manifest: '/site.webmanifest', //pwa
3029
robots: {
3130
index: true,
3231
follow: true,
@@ -40,20 +39,20 @@ export const metadata: Metadata = {
4039
},
4140
openGraph: {
4241
title: {
43-
default: seo.title,
44-
template: '%s | zhw',
42+
default: seo.ogTitle,
43+
template: seo.template,
4544
},
4645
images: [
4746
{
4847
url: '/api/og',
49-
alt: 'zhw blog',
48+
alt: seo.title,
5049
},
5150
],
5251
description: seo.description,
53-
siteName: 'zhw blog',
52+
siteName: seo.title,
5453
locale: 'zh_CN',
5554
type: 'website',
56-
url: 'https://blog-rbtb.vercel.app/',
55+
url: siteUrl,
5756
},
5857
};
5958

src/components/modules/shared/AccentColorStyleInjector/AccentColorStyleInjector.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Chroma from 'chroma-js';
55
import Color from 'colorjs.io';
66

77
import { createPngNoiseBackground } from '@/lib/noise';
8+
import { accentColorDark, accentColorLight } from '~/color';
89

910
const hexToOklchString = (hex: string) => {
1011
return new Color(hex).oklch;
@@ -18,10 +19,6 @@ const convertHexToRgbString = (hex: string): string => {
1819
return `${r} ${g} ${b}`;
1920
};
2021

21-
const accentColorLight = ['#33A6B8', '#FF6666', '#26A69A', '#fb7287', '#69a6cc'];
22-
23-
const accentColorDark = ['#F596AA', '#A0A7D4', '#ff7b7b', '#99D8CF', '#838BC6'];
24-
2522
const defaultAccentColor = { light: accentColorLight, dark: accentColorDark };
2623

2724
const lightBg = 'rgb(250, 250, 250)';

0 commit comments

Comments
 (0)