Skip to content

Commit 9686004

Browse files
authored
Merge pull request #99 from yel-hadd/master
[TCR-566] Support Badge and deprecated HTML elements as custom elements in VuePress
2 parents 564f184 + 970dfe1 commit 9686004

File tree

2 files changed

+58
-33
lines changed

2 files changed

+58
-33
lines changed

docs/.vuepress/config.ts

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { defineUserConfig, viteBundler } from "vuepress";
2-
import theme from "./theme";
3-
import plugins from "./config-user/plugins";
4-
import headFunctions from "./headFunctions";
1+
import { defineUserConfig, viteBundler } from 'vuepress';
2+
import theme from './theme';
3+
import plugins from './config-user/plugins';
4+
import headFunctions from './headFunctions';
55

66
export default defineUserConfig({
77
theme,
88
markdown: {
99
headers: {
1010
level: [2, 3, 4, 5],
1111
},
12-
anchor: {
12+
anchor: {
1313
permalink: true,
1414
permalinkBefore: true,
1515
permalinkSymbol: '#',
@@ -19,19 +19,34 @@ export default defineUserConfig({
1919
bundler: viteBundler({
2020
viteOptions: {
2121
ssr: {
22-
noExternal: ["vue-select", "vue-multiselect"],
22+
noExternal: ['vue-select', 'vue-multiselect'],
23+
},
24+
},
25+
vuePluginOptions: {
26+
template: {
27+
compilerOptions: {
28+
isCustomElement: (tag) => {
29+
// List of deprecated HTML tags to treat as custom elements
30+
// Add any other custom elements to this list
31+
const customElements = [
32+
'Badge', 'center', 'font', 'big', 'small', 'strike', 'tt',
33+
'marquee', 'blink', 'applet', 'frameset', 'frame', 'dir',
34+
];
35+
return customElements.includes(tag);
36+
},
37+
},
2338
},
2439
},
2540
}),
2641
head: headFunctions,
27-
scrollBehavior(to, from, savedPosition) {
42+
scrollBehavior(to, from, savedPosition) {
2843
if (to.hash) {
2944
return {
3045
el: to.hash,
3146
behavior: 'smooth',
3247
top: 80, // Adjust based on your header height
33-
}
48+
};
3449
}
35-
return savedPosition || { top: 0 }
50+
return savedPosition || { top: 0 };
3651
},
3752
});

docs/features/README.md

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -236,33 +236,43 @@ Since the module is fresh, it is in experimental mode – disabled by default fo
236236
Now two options can be used to control how brute force protection works for Dovecot:
237237

238238
<table>
239-
<tr>
240-
<th colspan="2">Condition</th>
241-
<th rowspan="2">Behavior</th>
242-
</tr >
243-
<tr >
244-
<td>PAM.exim_dovecot_protection</td>
245-
<td>PAM.exim_dovecot_native</td>
246-
</tr>
247-
<tr >
248-
<td><center>false</center></td>
249-
<td><center>any</center></td>
239+
<thead>
240+
<tr>
241+
<th colspan="2">Condition</th>
242+
<th rowspan="2">Behavior</th>
243+
</tr>
244+
<tr>
245+
<td>PAM.exim_dovecot_protection</td>
246+
<td>PAM.exim_dovecot_native</td>
247+
</tr>
248+
</thead>
249+
<tbody>
250+
<tr>
251+
<td><center>false</center></td>
252+
<td><center>any</center></td>
250253
<td>Dovecot protection <b>disabled</b></td>
251-
</tr>
252-
<tr >
253-
<td><center>true</center></td>
254-
<td><center>false</center></td>
255-
<td>Dovecot protection <b>enabled</b> (default)
256-
<ul><li>PAM-based module</li></ul>
254+
</tr>
255+
<tr>
256+
<td><center>true</center></td>
257+
<td><center>false</center></td>
258+
<td>
259+
Dovecot protection <b>enabled</b> (default)
260+
<ul>
261+
<li>PAM-based module</li>
262+
</ul>
257263
</td>
258-
</tr>
259-
<tr>
260-
<td><center>true</center></td>
261-
<td><center>true</center></td>
262-
<td>Dovecot protection <b>enabled</b>
263-
<ul><li>Native module ON</li></ul>
264+
</tr>
265+
<tr>
266+
<td><center>true</center></td>
267+
<td><center>true</center></td>
268+
<td>
269+
Dovecot protection <b>enabled</b>
270+
<ul>
271+
<li>Native module ON</li>
272+
</ul>
264273
</td>
265-
</tr>
274+
</tr>
275+
</tbody>
266276
</table>
267277

268278
The following commands can be used to control the Dovecot native module:

0 commit comments

Comments
 (0)