mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 03:32:51 +02:00
chore: refine user configuration standards
This commit is contained in:
parent
57e69c6067
commit
5d327ff4f8
7 changed files with 13000 additions and 101 deletions
|
@ -1,65 +1,90 @@
|
|||
import type { ThemeConfig } from '@/types'
|
||||
|
||||
export const themeConfig: ThemeConfig = {
|
||||
// SITE INFORMATION ---------------------------------------------------------------------------------------- //
|
||||
// SITE INFORMATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> START
|
||||
site: {
|
||||
// Choose One to Fill In
|
||||
title_EN: 'Retypeset', // support English, Spanish, Russian
|
||||
title_CN: '重新编排', // supports simplified, traditional Chinese, and Japanese
|
||||
// Choose One to Fill In
|
||||
subtitle_EN: '', // support English, Spanish, Russian
|
||||
subtitle_CN: '再现版式之美', // supports simplified, traditional Chinese, and Japanese
|
||||
// Site URL
|
||||
url: 'http://localhost:4321/',
|
||||
// Author name
|
||||
title: 'retypeset',
|
||||
subtitle: '再现版式之美',
|
||||
description: '一个优美的博客主题',
|
||||
author: 'radishzz',
|
||||
// Site Favicon
|
||||
favicon: 'https://image.radishzz.cc/image/favicon-round-48px.webp',
|
||||
// Site Language
|
||||
language: 'zh', // zh | tw | ja | en | es | ru
|
||||
url: 'http://localhost:4321/',
|
||||
favicon: '#',
|
||||
},
|
||||
// THEME SETTING ------------------------------------------------------------------------------------------- //
|
||||
theme: {
|
||||
color: 'auto',
|
||||
// Light Mode
|
||||
// SITE INFORMATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END
|
||||
|
||||
// COLOR SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> START
|
||||
color: {
|
||||
mode: 'light',
|
||||
light: {
|
||||
primary: '#333', // text color
|
||||
background: '#FFF', // background color
|
||||
grid: '#F3F3F3', // grid lines color
|
||||
primary: '#000000',
|
||||
backgroundStart: '#ffffff',
|
||||
backgroundEnd: '#f5f5f5',
|
||||
},
|
||||
// Dark Mode
|
||||
dark: {
|
||||
primary: '#DBDBDB', // text color
|
||||
background: '#121212', // background color
|
||||
grid: '#1B1B1B', // grid lines color
|
||||
primary: '#000000',
|
||||
backgroundStart: '#ffffff',
|
||||
backgroundEnd: '#000000',
|
||||
},
|
||||
},
|
||||
toc: {
|
||||
enable: true,
|
||||
depth: '2',
|
||||
},
|
||||
rss: {
|
||||
enabled: true,
|
||||
follow: {
|
||||
feedId: '68090849347654656',
|
||||
userId: '68014765825824768',
|
||||
},
|
||||
},
|
||||
analytics: {
|
||||
// google:
|
||||
umami: 'https://analytics.example.com/script.js',
|
||||
// COLOR SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END
|
||||
|
||||
// GLOBAL SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> START
|
||||
global: {
|
||||
language: 'zh',
|
||||
font: 'sans',
|
||||
rss: true,
|
||||
toc: true,
|
||||
},
|
||||
// GLOBAL SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END
|
||||
|
||||
// COMMENT SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> START
|
||||
comment: {
|
||||
waline: {
|
||||
serverURL: 'https://comment.radishzz.cc',
|
||||
serverURL: '#',
|
||||
emoji: [
|
||||
'//unpkg.com/@waline/emojis@1.2.0/bmoji',
|
||||
'//unpkg.com/@waline/emojis@1.2.0/weibo',
|
||||
'#',
|
||||
'#',
|
||||
],
|
||||
search: false,
|
||||
imageUploader: false,
|
||||
search: true,
|
||||
imageUploader: true,
|
||||
},
|
||||
},
|
||||
// COMMENT SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END
|
||||
|
||||
// SEO SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> START
|
||||
seo: {
|
||||
twitter: 'https://twitter.com/radishzz',
|
||||
meta: {
|
||||
google: '#',
|
||||
bing: '#',
|
||||
baidu: '#',
|
||||
},
|
||||
link: '#',
|
||||
googleAnalyticsID: '#',
|
||||
umamiAnalyticsID: '#',
|
||||
follow: {
|
||||
feedID: '#',
|
||||
userID: '#',
|
||||
},
|
||||
},
|
||||
// SEO SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END
|
||||
|
||||
// FOOTER SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> START
|
||||
footer: {
|
||||
linkA: {
|
||||
name: 'RSS',
|
||||
url: '#',
|
||||
},
|
||||
linkB: {
|
||||
name: 'Contact',
|
||||
url: '#',
|
||||
},
|
||||
linkC: {
|
||||
name: 'GitHub',
|
||||
url: '#',
|
||||
},
|
||||
},
|
||||
// FOOTER SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END
|
||||
}
|
||||
|
||||
export default themeConfig
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
import { defineCollection, z } from 'astro:content'
|
||||
|
||||
const postsCollection = defineCollection({
|
||||
type: 'content',
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
pubDate: z.date(),
|
||||
updatedDate: z.date().optional(),
|
||||
tags: z.array(z.string()).optional(),
|
||||
draft: z.boolean().optional().default(false),
|
||||
}),
|
||||
})
|
||||
|
||||
export const collections = {
|
||||
posts: postsCollection,
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
import Welcome from '../components/Welcome.astro'
|
||||
import Layout from '../layouts/Layout.astro'
|
||||
import Welcome from '@/components/Welcome.astro'
|
||||
import Layout from '@/layouts/Layout.astro'
|
||||
---
|
||||
|
||||
<Layout>
|
||||
|
|
80
src/types/index.d.ts
vendored
80
src/types/index.d.ts
vendored
|
@ -1,48 +1,74 @@
|
|||
export interface ThemeConfig {
|
||||
|
||||
site: {
|
||||
title_EN: string
|
||||
title_CN: string
|
||||
subtitle_EN: string
|
||||
subtitle_CN: string
|
||||
url: string
|
||||
title: string
|
||||
subtitle: string
|
||||
description: string
|
||||
author: string
|
||||
url: string
|
||||
favicon: string
|
||||
language: string
|
||||
}
|
||||
theme: {
|
||||
color: 'light' | 'dark' | 'auto'
|
||||
|
||||
color: {
|
||||
mode: 'light' | 'dark'
|
||||
light: {
|
||||
primary: string
|
||||
background: string
|
||||
grid: string
|
||||
backgroundStart: string
|
||||
backgroundEnd: string
|
||||
}
|
||||
dark: {
|
||||
primary: string
|
||||
background: string
|
||||
grid: string
|
||||
backgroundStart: string
|
||||
backgroundEnd: string
|
||||
}
|
||||
}
|
||||
toc: {
|
||||
enable: boolean
|
||||
depth: '1' | '2' | '3'
|
||||
}
|
||||
rss?: {
|
||||
enabled: boolean
|
||||
follow?: {
|
||||
feedId: string
|
||||
userId: string
|
||||
}
|
||||
}
|
||||
analytics?: {
|
||||
google?: string
|
||||
umami?: string
|
||||
|
||||
global: {
|
||||
language: string
|
||||
font: string
|
||||
rss: boolean
|
||||
toc: boolean
|
||||
}
|
||||
|
||||
comment?: {
|
||||
waline?: {
|
||||
serverURL: string
|
||||
serverURL?: string
|
||||
emoji?: string[]
|
||||
search?: boolean
|
||||
imageUploader?: boolean
|
||||
}
|
||||
}
|
||||
|
||||
seo?: {
|
||||
twitter?: string
|
||||
meta?: {
|
||||
google?: string
|
||||
bing?: string
|
||||
baidu?: string
|
||||
}
|
||||
link?: string
|
||||
googleAnalyticsID?: string
|
||||
umamiAnalyticsID?: string
|
||||
follow?: {
|
||||
feedID?: string
|
||||
userID?: string
|
||||
}
|
||||
}
|
||||
|
||||
footer: {
|
||||
linkA: {
|
||||
name: string
|
||||
url: string
|
||||
}
|
||||
linkB: {
|
||||
name: string
|
||||
url: string
|
||||
}
|
||||
linkC: {
|
||||
name: string
|
||||
url: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default ThemeConfig
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue