This repository was archived by the owner on May 13, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathOptions.ts
169 lines (160 loc) · 3.4 KB
/
Options.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/**
* A Directory-based Classifier
*/
import { PaginationConfig } from './Pagination';
import { GetScopePageTitle } from './Frontmatter';
export interface DirectoryClassifier {
/**
* Unique id for current classifier.
*/
id: string;
/**
* Matched directory name.
*/
dirname: string;
/**
* Entry page for current classifier.
*/
path: string;
/**
* Entry and pagination page titles for current classifier.
*/
title?: string;
/**
* Layout component name for entry page.
*/
layout?: string;
/**
* Frontmatter for entry page.
*/
frontmatter?: Record<string, any>;
/**
* Layout for matched page.
*/
itemLayout?: string;
/**
* Permalink for matched page.
*/
itemPermalink?: string;
/**
* Pagination config for current classifier.
*/
pagination?: PaginationConfig;
}
/**
* A Frontmatter-based Classifier
*/
export interface FrontmatterClassifier {
/**
* Unique id for current classifier.
*/
id: string;
/**
* Frontmatter keys used to classify pages.
* It's usually used to merge multiple tags with the same meaning
*
* e.g. keys: ['category', 'categories'],
*/
keys: string[];
/**
* Index page for current classifier.
*/
path: string;
/**
* Entry, scope and pagination page titles for current classifier.
*/
title?: string;
/**
* Layout for index page.
*/
layout?: string;
/**
* Layout for scope page.
* e.g. {id: 'tag', keys: ['tag'], scopeLayout: 'Foo'}
* `/tag/vue` will use `Foo.vue` as the layout
*/
scopeLayout?: string;
/**
* A function to get the title of scope page dynamically.
*/
getScopePageTitle?: GetScopePageTitle;
/**
* Frontmatter for index page.
*/
frontmatter?: Record<string, any>;
/**
* Pagination config for current classifier.
*/
pagination?: PaginationConfig;
}
/**
* Comment configuration
*/
/**
* Vssue configuration
* For details, head Vssue documentation: https://vssue.js.org/
*/
export interface VssueOptions {
platform: 'github' | 'github-v4' | 'gitlab' | 'bitbucket' | 'gitee';
owner: string;
repo: string;
clientId: string;
clientSecret: string;
baseURL: string;
state: string;
labels: Array<string>;
prefix: string;
admins: Array<string>;
perPage: number;
locale: string;
proxy: string | ((url: string) => string);
issueContent: (param: {
options: VssueOptions;
url: string;
}) => string | Promise<string>;
autoCreateIssue: boolean;
}
/**
* Disqus configuration
* For details, head vue-disqus documentation: https://github.com/ktquez/vue-disqus#props
*/
export interface DisqusOptions {
shortname: string;
identifier: string;
url: string;
title: string;
remote_auth_s3: string;
api_key: string;
sso_config: any;
language: string;
}
export interface Comment extends Partial<VssueOptions>, Partial<DisqusOptions> {
/**
* The comment service
*/
service: 'vssue' | 'disqus';
}
export interface Newsletter {
endpoint: string;
title: string;
content: string;
popupConfig: PopupConfig;
}
interface PopupConfig {
enabled: boolean;
popupComponent: string;
timeout: number;
}
/**
* Options for this plugin.
*/
export interface BlogPluginOptions {
directories: DirectoryClassifier[];
frontmatters: FrontmatterClassifier[];
globalPagination: PaginationConfig;
//TODO: define types
sitemap: any;
feed: any;
comment: Comment;
newsletter: Newsletter;
}