mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 11:41:17 +02:00
chore: update theme guide
This commit is contained in:
parent
0545b1d0e5
commit
f3fc03b8d6
7 changed files with 878 additions and 200 deletions
|
@ -12,18 +12,19 @@ Retypeset is a static blog theme based on the [Astro](https://astro.build/) fram
|
|||
|
||||
## Theme Configuration
|
||||
|
||||
Below is the theme configuration file [src/config.ts](https://github.com/radishzzz/astro-theme-retypeset/blob/master/src/config.ts) for Retypeset.
|
||||
Below is the theme configuration guide for Retypeset. Customize your blog by modifying the configuration file [src/config.ts](https://github.com/radishzzz/astro-theme-retypeset/blob/master/src/config.ts).
|
||||
|
||||
### Site
|
||||
### Site Information
|
||||
|
||||
```typescript
|
||||
```ts
|
||||
site: {
|
||||
// site title
|
||||
title: 'Retypeset'
|
||||
// site subtitle
|
||||
subtitle: 'Revive the beauty of typography'
|
||||
// site description
|
||||
description: 'Retypeset is a static blog theme based on the Astro framework. Inspired by Typography...'
|
||||
description: 'Retypeset is a static blog theme...'
|
||||
// use i18n title/subtitle/description from src/i18n/ui.ts instead of static ones above
|
||||
i18nTitle: true // true, false
|
||||
// author name
|
||||
author: 'radishzz'
|
||||
|
@ -35,27 +36,27 @@ site: {
|
|||
}
|
||||
```
|
||||
|
||||
### Color
|
||||
### Theme Color
|
||||
|
||||
```typescript
|
||||
```ts
|
||||
color: {
|
||||
// default theme mode
|
||||
mode: 'light' // light, dark
|
||||
// light mode
|
||||
light: {
|
||||
// primary color
|
||||
// used for title, hover, etc
|
||||
// oklch color picker: https://oklch.com/
|
||||
primary: 'oklch(25% 0.005 298)'
|
||||
// secondary color
|
||||
// used for post text
|
||||
secondary: 'oklch(40% 0.005 298)'
|
||||
// background color
|
||||
background: 'oklch(96% 0.005 298)'
|
||||
};
|
||||
}
|
||||
// dark mode
|
||||
dark: {
|
||||
// primary color
|
||||
// used for title, hover, etc
|
||||
// oklch color picker: https://oklch.com/
|
||||
primary: 'oklch(92% 0.005 298)'
|
||||
// secondary color
|
||||
// used for post text
|
||||
|
@ -66,16 +67,18 @@ color: {
|
|||
}
|
||||
```
|
||||
|
||||
### Font
|
||||
### Global Settings
|
||||
|
||||
```typescript
|
||||
```ts
|
||||
global: {
|
||||
// default language
|
||||
// language of the site root path '/'
|
||||
locale: 'zh' // zh, zh-tw, ja, en, es, ru
|
||||
// more languages
|
||||
// Generate multi-language paths such as '/es/' '/ru/'
|
||||
// not fill in the locale code above again
|
||||
moreLocales: ['zh-tw', 'ja', 'en', 'es', 'ru'] // ['zh', 'zh-tw', 'ja', 'en', 'es', 'ru']
|
||||
// font styles for post text
|
||||
// font style
|
||||
fontStyle: 'sans' // sans, serif
|
||||
// date format for posts
|
||||
dateFormat: 'YYYY-MM-DD' // YYYY-MM-DD, MM-DD-YYYY, DD-MM-YYYY, MONTH DAY YYYY, DAY MONTH YYYY
|
||||
|
@ -84,27 +87,25 @@ global: {
|
|||
}
|
||||
```
|
||||
|
||||
### Comment
|
||||
### Comment System
|
||||
|
||||
```typescript
|
||||
```ts
|
||||
comment: {
|
||||
// enable comment system
|
||||
enabled: true // true, false
|
||||
// waline comment system
|
||||
// https://waline.js.org/en/
|
||||
waline: {
|
||||
// server url
|
||||
serverURL: 'https://retypeset-comment.radishzz.cc'
|
||||
// emoji url
|
||||
emoji: [
|
||||
'https://unpkg.com/@waline/emojis@1.2.0/tw-emoji',
|
||||
// 'https://unpkg.com/@waline/emojis@1.2.0/bmoji',
|
||||
'https://unpkg.com/@waline/emojis@1.2.0/tw-emoji'
|
||||
// 'https://unpkg.com/@waline/emojis@1.2.0/bmoji'
|
||||
// more emojis: https://waline.js.org/en/guide/features/emoji.html
|
||||
]
|
||||
// gif search
|
||||
search: false // true, false
|
||||
// image uploader
|
||||
// bug: unable to hide image uploader icon
|
||||
imageUploader: false // true, false
|
||||
}
|
||||
}
|
||||
|
@ -112,39 +113,32 @@ comment: {
|
|||
|
||||
### SEO
|
||||
|
||||
```typescript
|
||||
```ts
|
||||
seo: {
|
||||
// @twitter ID
|
||||
twitterID: '@radishzz_'
|
||||
// site verification
|
||||
verification: {
|
||||
// google search console
|
||||
// https://search.google.com/search-console
|
||||
google: 'AUCrz5F1e5qbnmKKDXl2Sf8u6y0kOpEO1wLs6HMMmlM'
|
||||
// bing webmaster tools
|
||||
// https://www.bing.com/webmasters
|
||||
bing: '64708CD514011A7965C84DDE1D169F87'
|
||||
// yandex webmaster
|
||||
// https://webmaster.yandex.com
|
||||
yandex: ''
|
||||
// baidu search
|
||||
// https://ziyuan.baidu.com
|
||||
baidu: ''
|
||||
};
|
||||
}
|
||||
// google analytics
|
||||
// https://analytics.google.com
|
||||
googleAnalyticsID: ''
|
||||
// umami analytics
|
||||
// https://cloud.umami.is
|
||||
umamiAnalyticsID: '520af332-bfb7-4e7c-9386-5f273ee3d697'
|
||||
// follow verification
|
||||
// https://follow.is/
|
||||
follow: {
|
||||
// feed ID
|
||||
feedID: ''
|
||||
// user ID
|
||||
userID: ''
|
||||
};
|
||||
}
|
||||
// apiflash access key
|
||||
// automatically generate website screenshots for open graph images
|
||||
// get your access key at: https://apiflash.com/
|
||||
|
@ -152,40 +146,39 @@ seo: {
|
|||
}
|
||||
```
|
||||
|
||||
### Footer
|
||||
### Footer Settings
|
||||
|
||||
```typescript
|
||||
```ts
|
||||
footer: {
|
||||
// social links
|
||||
links: [
|
||||
{
|
||||
name: 'RSS',
|
||||
url: '/rss.xml' // rss.xml, atom.xml
|
||||
url: '/rss.xml', // rss.xml, atom.xml
|
||||
},
|
||||
{
|
||||
name: 'GitHub',
|
||||
url: 'https://github.com/radishzzz/astro-theme-retypeset'
|
||||
url: 'https://github.com/radishzzz/astro-theme-retypeset',
|
||||
},
|
||||
{
|
||||
name: 'Twitter',
|
||||
url: 'https://x.com/radishzz_'
|
||||
url: 'https://x.com/radishzz_',
|
||||
},
|
||||
// {
|
||||
// name: 'Email';
|
||||
// url: 'https://example@gmail.com'
|
||||
// name: 'Email',
|
||||
// url: 'https://example@gmail.com',
|
||||
// }
|
||||
];
|
||||
]
|
||||
// year of website start
|
||||
startYear: 2024
|
||||
}
|
||||
```
|
||||
|
||||
### Preload
|
||||
### Preload Resources
|
||||
|
||||
```typescript
|
||||
```ts
|
||||
preload: {
|
||||
// link prefetch
|
||||
// docs: https://docs.astro.build/en/guides/prefetch/#prefetch-strategies
|
||||
// link prefetch strategies
|
||||
linkPrefetch: 'viewport' // hover, tap, viewport, load
|
||||
// comment server url
|
||||
commentURL: 'https://retypeset-comment.radishzz.cc'
|
||||
|
@ -193,11 +186,9 @@ preload: {
|
|||
imageHostURL: 'https://image.radishzz.cc'
|
||||
// custom google analytics js
|
||||
// for users who route analytics javascript to a customized domain
|
||||
// See https://gist.github.com/xiaopc/0602f06ca465d76bd9efd3dda9393738
|
||||
customGoogleAnalyticsJS: ''
|
||||
// custom umami analytics js
|
||||
// for users who deploy umami on their own, or route analytics javascript to a customized domain
|
||||
// see https://github.com/umami-software/umami/discussions/1026
|
||||
customUmamiAnalyticsJS: 'https://js.radishzz.cc/jquery.min.js'
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue