-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrspress.config.ts
73 lines (71 loc) · 2.13 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
import fs from 'node:fs';
import path from 'node:path';
import { pluginChangelog } from 'rspress-plugin-changelog';
import type { ChangelogPluginOptions } from 'rspress-plugin-changelog';
import pluginSitemap from 'rspress-plugin-sitemap';
import { defineConfig } from 'rspress/config';
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: '⛅ Auraflare',
description: 'Cloudflare® 资源集成解决方案',
icon: 'https://avatars.githubusercontent.com/u/190900859?s=200&v=4',
logo: 'https://avatars.githubusercontent.com/u/190900859?s=80&v=4',
logoText: 'Auraflare',
// logo: {
// light: '/rspress-light-logo.png',
// dark: '/rspress-dark-logo.png',
// },
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: {
lastUpdated: true,
socialLinks: [
{ icon: 'github', mode: 'link', content: 'https://github.com/Auraflare' },
{
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: 'https://Auraflare.github.io',
}),
pluginChangelog({
fetchOnDev: false,
items: generateChangelogParams([
{
title: '🇩 (D)DNS',
routePath: 'dns',
repo: 'Auraflare/DNS',
},
{
title: '1️⃣ 1.1.1.1 + WARP',
routePath: '1.1.1.1',
repo: 'Auraflare/1.1.1.1',
},
]),
}),
],
});