FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
unplugin-vue-markdown/src/types.ts at main · unplugin/unplugin-vue-markdown · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
unplugin
/
unplugin-vue-markdown
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
37
Star
626
Code
Issues
16
Pull requests
2
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
unplugin-vue-markdown
/
src
/
types.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
236 lines (207 loc) · 5.49 KB
Breadcrumbs
unplugin-vue-markdown
/
src
/
types.ts
Copy path
File metadata and controls
236 lines (207 loc) · 5.49 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
import
type
{
ComponentPluginOptions
}
from
'@mdit-vue/plugin-component'
import
type
{
FrontmatterPluginOptions
}
from
'@mdit-vue/plugin-frontmatter'
import
type
{
MarkdownItEnv
}
from
'@mdit-vue/types'
import
type
MarkdownExit
from
'markdown-exit'
import
type
{
MarkdownExitOptions
,
PluginSimple
,
PluginWithOptions
,
}
from
'markdown-exit'
import
type
{
FilterPattern
}
from
'unplugin-utils'
import
type
{
preprocessHead
}
from
'./core/head'
/** a `<meta />` property in HTML is defined with the following name/values */
export
interface
MetaProperty
{
key
?:
string
/**
* the "name" property used by Facebook and other providers who
* use the Opengraph standards
*/
property
?:
string
/**
* used by google to identify the "name" of the name/value pair
*/
itemprop
?:
string
/**
* used by Twitter to indicate the "name" field in a meta properties
* name/value pairing
*/
name
?:
string
/**
* The value of the meta property
*/
content
?:
any
[
key
:
string
]
:
unknown
}
/**
* Frontmatter content is represented as key/value dictionary
*/
export
interface
Frontmatter
{
title
?:
string
name
?:
string
description
?:
string
meta
?:
MetaProperty
[
]
[
key
:
string
]
:
unknown
}
export
interface
Options
{
/**
* Explicitly set the Vue version
*
*
@default
auto detected
*/
vueVersion
?:
string
/**
* Enable head support, need to install @unhead/vue and register to App in main.js
*
*
@default
true
*/
headEnabled
?:
boolean
/**
* The head field in frontmatter used to be used for @unhead/vue
*
* When an empty string is passed, it will use the root properties of the frontmatter
*
*
@default
''
*/
headField
?:
string
/**
* Parse for frontmatter
*
*
@default
true
*/
frontmatter
?:
boolean
/**
* Parse for excerpt
*
* If `true`, it will be passed to `frontmatterPreprocess` as `frontmatter.excerpt`, replacing the `excerpt` key in frontmatter, if there's any
*
*
@default
false
*/
excerpt
?:
boolean
/**
* Remove custom SFC block
*
*
@default
['route', 'i18n']
*/
customSfcBlocks
?:
string
[
]
/**
* Options passed to [@mdit-vue/plugin-component](https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-component)
*/
componentOptions
?:
ComponentPluginOptions
/**
* Options passed to [@mdit-vue/plugin-frontmatter](https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-frontmatter)
*/
frontmatterOptions
?:
FrontmatterPluginOptions
/**
* Custom function to provide defaults to the frontmatter and
* move certain attributes into the "meta" category.
*
* Note: _overriding this will remove built-in functionality setting
* "meta" properties and the built-in "head" support. Do this only
* if you know what you're doing._
*/
frontmatterPreprocess
?:
(
frontmatter
:
Frontmatter
,
options
:
ResolvedOptions
,
id
:
string
,
defaultHeadProcess
:
typeof
preprocessHead
,
)
=>
{
head
:
Record
<
string
,
any
>
frontmatter
:
Frontmatter
}
/**
* Expose frontmatter via expose API
*
*
@default
true
*/
exposeFrontmatter
?:
boolean
/**
* Expose excerpt via expose API
*
*
@default
false
*/
exposeExcerpt
?:
boolean
/**
* Export frontmatter in component module
*
*
@default
true
*/
exportFrontmatter
?:
boolean
/**
* Add `v-pre` to `<code>` tag to escape curly brackets interpolation
*
*
@see
https://github.com/unplugin/unplugin-vue-markdown/issues/14
*
@default
true
*/
escapeCodeTagInterpolation
?:
boolean
/**
* Options passed to markdown-exit
*/
markdownOptions
?:
MarkdownExitOptions
/**
* Plugins for markdown-exit
*/
markdownUses
?:
(
|
PluginSimple
|
[
PluginSimple
|
PluginWithOptions
<
any
>
,
any
]
|
any
)
[
]
/**
* A function providing the markdown-exit instance gets the ability to apply custom
* settings/plugins
*/
markdownSetup
?:
(
md
:
MarkdownExit
)
=>
void
|
Promise
<
void
>
/**
*
@deprecated
Use `markdownOptions` instead
*/
markdownItOptions
?:
MarkdownExitOptions
/**
*
@deprecated
Use `markdownUses` instead
*/
markdownItUses
?:
(
|
PluginSimple
|
[
PluginSimple
|
PluginWithOptions
<
any
>
,
any
]
|
any
)
[
]
/**
*
@deprecated
Use `markdownSetup` instead
*/
markdownItSetup
?:
(
md
:
MarkdownExit
)
=>
void
|
Promise
<
void
>
/**
* Wrap the rendered html in a div
*
*
@default
true
*/
wrapperDiv
?:
boolean
/**
* Class names for wrapper div
*
* This option will be ignored if `wrapperDiv` is set to `false`
*
*
@default
'markdown-body'
*/
wrapperClasses
?:
string
|
string
[
]
|
undefined
|
null
|
(
(
id
:
string
,
code
:
string
)
=>
string
|
string
[
]
|
undefined
|
null
)
/**
* Component name to wrapper with
*
*
@default
undefined
*/
wrapperComponent
?:
string
|
undefined
|
null
|
(
(
id
:
string
,
code
:
string
)
=>
string
|
undefined
|
null
)
/**
* Custom tranformations apply before and after the markdown transformation
*/
transforms
?:
{
before
?:
(
code
:
string
,
id
:
string
)
=>
string
|
Promise
<
string
>
after
?:
(
code
:
string
,
id
:
string
)
=>
string
|
Promise
<
string
>
/**
* Return extra code to be injected into the `<script>` tag
*/
extraScripts
?:
(
frontmatter
:
Record
<
string
,
any
>
,
id
:
string
)
=>
string
[
]
|
Promise
<
string
[
]
>
}
include
?:
FilterPattern
exclude
?:
FilterPattern
}
export
interface
ResolvedOptions
extends
Required
<
Options
>
{
}
export
type
{
MarkdownExit
,
MarkdownExitOptions
}
export
interface
MarkdownEnv
extends
MarkdownItEnv
{
id
:
string
}
Back
|
FazBrowse Home
|
New Git URL