-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrspress.config.ts
93 lines (90 loc) · 2.54 KB
/
rspress.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import fs from 'node:fs';
import path from 'node:path';
import type { ChangelogPluginOptions } from 'rspress-plugin-changelog';
import { pluginChangelog } from 'rspress-plugin-changelog';
import pluginSitemap from 'rspress-plugin-sitemap';
import { defineConfig } from 'rspress/config';
const siteUrl = 'https://NSRingo.github.io';
const generateChangelogParams = (items: Omit<ChangelogPluginOptions['items'][number], 'type'>[]) =>
items.map<ChangelogPluginOptions['items'][number]>((item) => ({
type: 'github-releases',
templatePath: './changelog.handlebars',
...item,
}));
export default defineConfig({
root: path.join(__dirname, 'docs'),
title: 'iRingo',
logoText: 'iRingo',
description: '解锁完整的 Apple 功能和集成服务',
icon: '/NSRingoMasked/NSRingoMasked64x.png',
logo: {
light: '/NSRingoMasked/[email protected]',
dark: '/NSRingoMasked/[email protected]',
},
head: [
['link', { ref: 'preconnect', href: '//ipolyfill.edge-byted.com' }],
['link', { ref: 'dns-prefetch', href: '//ipolyfill.edge-byted.com' }],
['script', { src: '//ipolyfill.edge-byted.com/0.0.25/polyfill.min.js', crossorigin: '' }],
],
themeConfig: {
socialLinks: [
{ icon: 'github', mode: 'link', content: 'https://github.com/NSRingo' },
{
icon: {
svg: fs.readFileSync(path.join(__dirname, 'docs', 'public', 'telegram.svg'), 'utf-8'),
},
mode: 'link',
content: 'https://t.me/GetSomeFries',
},
],
},
builderConfig: {
source: {
alias: {},
},
},
markdown: {
mdxRs: false,
remarkPlugins: [[require('remark-github')]],
},
plugins: [
pluginSitemap({
domain: siteUrl,
}),
pluginChangelog({
fetchOnDev: false,
items: generateChangelogParams([
{
title: '🌤 WeatherKit',
routePath: 'weather-kit',
repo: 'NSRingo/WeatherKit',
},
{
title: '🛰️ 地理服务',
routePath: 'GeoServices',
repo: 'NSRingo/GeoServices',
},
{
title: '⭕ Siri',
routePath: 'Siri',
repo: 'NSRingo/Siri',
},
{
title: '📺 TV',
routePath: 'apple-tv',
repo: 'NSRingo/TV',
},
{
title: '📰 News',
routePath: 'apple-news',
repo: 'NSRingo/News',
},
{
title: '✈ TestFlight',
routePath: 'test-flight',
repo: 'NSRingo/TestFlight',
},
]),
}),
],
});